Debian之—— Debian 9允許root使用者登入和以ssh方式登入
阿新 • • 發佈:2019-01-09
轉載請註明出處:https://blog.csdn.net/l1028386804/article/details/86144423
1.允許以root使用者登入作業系統
預設情況下debian是不允許以root使用者登入的,只能以其他使用者登入系統中,然後su到root使用者下進行操作。
1.1修改/etc/gdm3/daemon.conf檔案
新增下面一行AllowRoot = true
[security]
AllowRoot = true
1.2修改/etc/pam.d/gdm-password
註釋掉下面內容
#auth required pam_succeed_if.so user != root quiet_success
然後重啟作業系統,就可以使用root使用者登入作業系統了。
2.以root身份通過ssh登入作業系統
2.1修改/etc/ssh/sshd_config
將
#PermitRootLogin prohibit-password
修改為
PermitRootLogin yes
2.2重啟ssh即可
service sshd restart
或
/etc/init.d/ssh restart
之後就可以以root使用者ssh登入了。