Posts Tagged ‘Solution to can’t become root with “su root” – (pam_authenticate: Authentication failure) solution’

Solution to can’t become root with “su root” – (pam_authenticate: Authentication failure) solution

Tuesday, March 8th, 2011

I’ve stumbled upon a weird problem after my linux recovery. With normal user credentials I was not able to properly execute the su root

After some investigation in /var/log/auth.log I found the following error:

Mar 8 19:12:38 noah login[2956]: pam_unix(login:session): session opened for user hipo by LOGIN(uid=0)
Mar 8 19:13:14 noah unix_chkpwd[3442]: check pass; user unknown
Mar 8 19:13:24 noah unix_chkpwd[3452]: check pass; user unknown
Mar 8 19:13:24 noah unix_chkpwd[3452]: password check failed for user (root)
Mar 8 19:13:24 noah su[3441]: pam_unix(su:auth): authentication failure; logname=hipo uid=1000 euid=1000 tty=/dev/tty2 ruser=hipo rhost= user=root
Mar 8 19:13:26 noah su[3441]: pam_authenticate: Authentication failure
Mar 8 19:13:26 noah su[3441]: FAILED su for root by hipo

On linuxforums website I’ve found some people complaining about the same issue as mine. Somebody in the forums pointed out that the issue is directly caused by the /etc/pam.d/su pam configuration file.
Logically I’ve checked which debian package does this file belongs to in order to reinstall the package with the command:

debian:~# dpkg -S /etc/pam.d/su
login: /etc/pam.d/su

Next I reinstalled the login package with:

debian:~# apt-get install --reinstall login

Now after the reinstall of the login deb was completed the issues with su root from normal user account are gone.