How to change root password on SUSE / OpenSUSE Linux

last updated in Categories , ,

I am a new user of SUSE Linux or OpenSUSE Linux servers. I need to change the password for root user account on SUSE or OpenSUSE desktop. How do I change the root password on SUSE / OpenSUSE Linux using command line options?

Introduction – You need to use the passwd command. It is used to update the user’s authentication token(s) i.e. password. Let us see how to change the root user password on SUSE Enterprise Linux system or OpenSUSE desktop/workstation.

How to change root password on SUSE or OpenSUSE

The procedure for changing the password of root is as follows:

  1. First, log in to the SUSE server using ssh or console
  2. Open a shell prompt and type the passwd command to change root password in OpenSUSE
  3. The actual command to change the password for root on SUSE Linux is sudo passwd root

NOTE: Please note that vivek@suse-nixcraft:~> is my shell prompt. You need to type commands after the $ prompt.

SUSE change root password command

I am going to log in to my SUSE Linux 12.x/15.x server using the ssh command:
ssh vivek@suse-nixcraft
Once logged in enter the command passwd as follows:
vivek@suse-nixcraft:~> sudo passwd root
First you need to type the password for vivek user. After that the passwd command asks for the new password, which you will have to enter two times:

How to change root password on SUSE or OpenSUSE Linux
Changing root account passwords on an OpenSUSE or SUSE Enterprise Linux server

The next time you log in to a SUSE server/workstation, use the new password.

Slightly different procedure for changing passwords in SUSE

One can use the following procedure too:
vivek@suse-nixcraft:~> ssh user@your-centos-server-name-ip
Become a root user via the su command or sudo command:
vivek@suse-nixcraft:~> sudo -i
OR
vivek@suse-nixcraft:~> su -
Finally change your root user password:
passwd

Conclusion

This page explained the process for changing the password of root user using the passwd command on a SUSE.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Start the discussion at www.nixcraft.com

Historical Comment Archive

1 comment

  1. How to change the root password on SUSE?
    YaST->Security
    Of couse we can use
    passwd
    sudo passwd user1
    sudo passwd root

    Still, have a question? Get help on our forum!