How to Set Root Password in Linux?
Contents

How to change root password in Ubuntu

  • Type the following command to become root user and issue passwd: sudo -i. passwd.
  • OR set a password for root user in a single go: sudo passwd root.
  • Test it your root password by typing the following command: su –

How do I change my root password?

To change a password on behalf of a user, first sign on or “su” to the “root” account. Then type, “passwd user” (where user is the username for the password you are changing). The system will prompt you to enter a password. Passwords do not echo to the screen when you enter them.

How do I change the root password in Suse Linux 12?

For SLES 11.x

  1. Press enter to boot.
  2. (none):/ # mount -o remount,rw /
  3. Go to the Kernel Line and append the command “init=/bin/bash”
  4. Press Ctrl-x or F10 to boot.
  5. Run the mount command to mount the file system in rw mode and then try to reset root password.
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest