Ubuntu启用 root账号

Ubuntu启用 root账号

主要使用2条命令

 


sudo passwd root
sudo passwd -u root

sudo vi /etc/ssh/sshd_config

修改 PermitRootLogin without-password 为PermitRootLogin yes

之后

sudo service ssh restart

 


hadoop2@hadoop2-VirtualBox:~$  sudo passwd  root
[sudo] password for hadoop2: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
hadoop2@hadoop2-VirtualBox:~$ 
hadoop2@hadoop2-VirtualBox:~$    sudo passwd  -u root
passwd: password expiry information changed.
hadoop2@hadoop2-VirtualBox:~$ 
hadoop2@hadoop2-VirtualBox:~$ su - root
Password: 


vi /etc/ssh/sshd_config

修改 PermitRootLogin without-password  为PermitRootLogin yes


service ssh restart

Comment

*

沪ICP备14014813号-2

沪公网安备 31010802001379号