Wie ist es möglich, dass ich mich nicht mit su root
oder als root anmelden kann su
(ich erhalte einen falschen Passwortfehler), aber ich kann mich mit ssh root@localhost
oder ssh root@my_local_IP
mit demselben Passwort anmelden ?
Ich benutze CentOS 6.4.
Update1 :
cat /etc/pam.d/su
gibt:
#%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
gibt:
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
ca. 20 mal wiederholt.
ssh 192.168.1.218
Sie sich nur als Sie selbst an? Um sich als root via anzumelden, ssh
benötigen Sie normalerweise ssh root@192.168.1.218
oder ssh root@localhost
.
echo $$
), öffnen Sie (z. B. über ssh
) eine Root-Shell (erforderlich zum Verfolgen von SUID-Binärdateien) und starten Sie strace
diese Shell: strace -o su.strace -p 12345 -f
und suchen Sie vor der Fehlermeldung nach seltsamen Fehlern. Oder kopieren Sie die letzten 30 Zeilen vor der Fehlermeldung in Ihre Frage, wenn Sie mit dieser Art von Ausgabe nicht vertraut sind.
Process 11736 attached - interrupt to quit
chmod 4755 /bin/su
um dieses Problem zu beheben.
/etc/securetty
(cp /etc/securetty{,.old}; : > /etc/securetty
). Wenn das immer noch nicht funktioniert, geben Sie den Inhalt von an/etc/pam.d/su
.