Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im recently working on a clients box, and SSH into the box with root credentials work but when i try to su or sudo to root user it states incorrect password. I tried changed the root password and know im typing it correctly.

Thanks for help

share|improve this question
I had to change settings that was added to /etc/pam.d/su by another administrator – Kwazii Dec 13 '12 at 3:14
up vote 6 down vote accepted

sudo and su have different configuration files.

For sudo to work properly, the non-root user you are logging in should be either explicitly (I mean by user name) or implicitly (either in a UNIX group or in a defined set of users) permitted to run sudo su - If you don't know how this is configured, just follow the examples in the /etc/sudoers file

For su, check the /etc/pam.d/su file to see if it is configured to prevent from being run.

And neither of these prevent you from logging directly into troot account from ssh, provided sshd_config file is permitting this login, which in your case, is true.

share|improve this answer
Thank you that worked great to fix the sudo problem and i figuired out the su problem! – Kwazii Dec 13 '12 at 3:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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