ch /etc/
chmod 644 passwd group shadow
chmod 400 gshadow
cd ssh
chmod 600 moduli ssh_host_dsa_key ssh_host_key ssh_host_rsa_key
chmod 644 ssh_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub
chmod 640 ssh_config
然後嘗試使用 ssh 登入,正常。
如果使用普通使用者登入,使用 su – 切換 root 會出現以下錯誤:
root “su cannot set groups”
這是因為 su 必須有 s 許可權才能預讀取 root 的相關配置,需要使用如下命令:
chmod u+x  `which su`
然後就可以進入系統了。
找一台乾淨的機器,把系統的許可權匯出,然後在匯入本機
在乾淨的機器上執行:getfacl -R / > ./linux.chmod.bak
在本機上執行:setfacl –restore=/root/linux.chmod.bak
重啓站羣服務器使許可權生效