您的位置:首页 > 其它

树莓派系统(基于Deibian)启用root账户

2017-07-19 19:12 337 查看

为root设置密码

pi@raspberrypi:~ $ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully


解锁root账户

因为配置文件没有修改,所以失败。

pi@raspberrypi:~ $ sudo passwd --unlock root
passwd: password expiry information changed.


去/etc下

pi@raspberrypi:/etc/ssh $ ls
moduli            ssh_host_dsa_key.pub    ssh_host_ed25519_key.pub
ssh_config        ssh_host_ecdsa_key      ssh_host_rsa_key
sshd_config       ssh_host_ecdsa_key.pub  ssh_host_rsa_key.pub
ssh_host_dsa_key  ssh_host_ed25519_key


修改ssh配置文件的读写属性

pi@raspberrypi:/etc/ssh $ sudo chmod a+wx sshd_config


搜索关键字Permit

:/Permit


修改PermitRootLogin的属性

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: