Su: Authentication service cannot retrieve authentication info

[folaht@pjehrsohmehj ~]$ su
Password :
su: Authentication service cannot retrieve authentication info

No idea why it stopped working or maybe it never worked at all?
I can still run sudo su and sudo -i.

If you do not remember, then it has probably never worked, and the error message suggests that it’s because you never set a password for the root account. su is not the same thing as sudo.

If you want to enable it, then issue… :arrow_down:

sudo su -
passwd

You will be prompted for a password, but it will not be visible, so make sure you make no typos. After that, you’ll be able to use su as a normal user and log into the root account. However… :arrow_down:

  • You should never log into a graphical session with the root account. It is too easy to screw up your system that way.

  • When using su, always invoke it as one of the three options below… :arrow_down:

su -
su -l root
su - root

Never invoke it without a trailing hyphen, because this will make you become root while inheriting the environment and home directory of your normal user account, with as a result that you might be overwriting existing files and in the process change their ownership to root:root.

4 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.