::为防止国内用户访问不了这个链接,特复制黏贴一下::
How is it possible that I cannot log in as root by I'm using CentOS 6.4. Update1 :cat /etc/pam.d/su gives: #%PAM-1.0 auth sufficient pam_rootok.so # Uncomment the following line to implicitly trust users in the "wheel" group. #auth sufficient pam_wheel.so trust use_uid # Uncomment the following line to require a user to be in the "wheel" group. #auth required pam_wheel.so use_uid auth include system-auth account sufficient pam_succeed_if.so uid = 0 use_uid quiet account include system-auth password include system-auth session include system-auth session optional pam_xauth.so Update2 :$ sudo grep su /var/log/secure | grep -v sudo gives : Feb 23 13:12:17 fallah su: pam_unix(su:auth): authentication failure; logname=fallah uid=501 euid=501 tty=pts/0 ruser=fallah rhost= user=root repeated about 20 times. | |||||||||||||||||||||
|
2 Answers
+50 | In your comment, you said that -rwxrwxrwx. 1 root root 30092 Jun 22 2012 /bin/su There are two problems here.
To fix this, login as chmod 4755 /bin/su or, alternatively, chmod u+s,g-w,o-w /bin/su (The standards document for chmod goes into more detail about what kinds of arguments it takes.) This will restore the mode bits to the way they were when the operating system was first installed. When you list this file, it ought to look like this: -rwsr-xr-x. 1 root root 30092 Jun 22 2012 /bin/su
| ||||||||||||||||||||
|
转载于:https://blog.51cto.com/zorro/1536186