1. 程式人生 > >su root, incorrect password, 密碼是正確的

su root, incorrect password, 密碼是正確的

su root, incorrect password, 密碼是正確的

2011年06月04日 11:36:00 denglei265 閱讀數:27173 標籤: centos2010c 更多

個人分類: Linux

CentOs系統,在使用su 時提示:incorrect password, 但是密碼確實是正確的.

查找了許久,使用方法如下:

 

一.檢視
/etc/pam.d/su 檔案 看看下面這句是不是設成有效了
auth required pam_whell.so use_uid

在看看
/etc/login.defs 檔案 是不是有下面一句
SU_WHEEL_ONLY yes

如果是,註釋掉的.

二.看/bin/su檔案的屬性是否'rwsr-xr-x',如果不是請改過。

chmod u+s /bin/su 

如果u - 其他任意使用者都可以,某一特定使用者不行,解決方法是:

記下該使用者的uid和gid及相關屬組,刪除,重建,賦予同樣的gid和組id

註釋:不行就刪使用者,重新建立,加組