使用 root 用戶(hù)登錄,新建一個(gè)普通的用戶(hù) newuser
[root@iZ2864f6btwZ ~]# useradd -M newuser
注意:newuser為你想要?jiǎng)?chuàng)建的用戶(hù)名稱(chēng),其中
-M是指不要自動(dòng)建立用戶(hù)的登錄目錄
設(shè)置用戶(hù)密碼
[root@iZ2864f6btwZ ~]# passwd newuser
Changing password for user newuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
修改 newuser 對(duì)應(yīng)的/etc/passwd信息,保持 root 和 newuser 后面的信息一致
[root@iZ2864f6btwZ ~]# vim /etc/passwd
...
root:x:0:0:root:/root:/bin/bash
...
newuser:x:0:0:root:/root:/bin/bash
...
切換 newuser 用戶(hù)
[root@iZ2864f6btwZ ~]# su - newuser
禁用 root 賬號(hào)
[root@iZ2864f6btwZ ~]# usermod -L root
結(jié)尾:在 SSH 終端使用 root 賬戶(hù)登錄,如果登錄失敗則偽裝成功,此時(shí)使用 newuser 賬戶(hù)登錄將擁有 root 的權(quán)限,可以將 newuser 當(dāng)作 root 的一個(gè)別名,這樣別人連你的用戶(hù)名都不知道了,想要黑你又更難了吧。