Is there a way to disable the root account completely on openSUSE so you can administer your system like the way you would do in Ubuntu?

  • FYI. If is for a new installation, I think opensuse installer has this option. – Rufo El Magufo Sep 28 '11 at 23:47


Basically, you just make sure the 'sudoers' file allows anybody in the 'admin' group (or whatever group you want) to execute files using 'sudo':

%admin ALL=(ALL)

Then you disable the 'root' account password with:

passwd -d root

This should work with openSUSE too.

  • Does it also fix Policykit? – Jonathan Frank Sep 28 '11 at 15:47
  • 2
    you might want to use passwd -d root, rather than passwd -l root. the -d option disables the password for root, but leaves the account in an active state that will still run cron jobs, etc. – Tim Kennedy Sep 28 '11 at 16:42
  • Oh, sorry; I've never used PolicyKit. I've always just used sudo. With PolicyKit, don't you just tell it what commands a regular user can run? Would disabling 'root' affect that at all? If 'root' still needs to be enabled for PolicyKit to work, you could always just set root's shell to '/bin/false'. EDIT: Good call, Tim Kennedy! I'll edit that in. – Kasius Sep 28 '11 at 16:49

I would not recommend disabling the root account by blanking the root password. This will create implication for the user when working in GUI. E.g. YaST requires specifically the root password. As sudo is not a program and a built-in command, it cannot be invoked by GUI. You will then have to invoke YaST from CLI using sudo to be able to make any changes. You will also not be able to shut down the machine from within GUI if file permissions set to secure or paranoid.

I would recommend disabling the root login by changing the root shell to "nologin", e.g.


in /etc/passwd

  • Welcome to U&L, and nice first answer! – cat Feb 3 '16 at 15:48
  • If you use kdesu, you can configure it to use sudo instead of su, and YaST will work fine. It is described in this answer. The situation with gksu is unclear. – Arnavion May 10 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.