- sudo -i
- adduser peter
- passwd peter
- whereis sudoers
- nano /etc/sudoers
-
- 添加一行新用户到root组
- ## Allow root to run any commands anywhere
- root ALL=(ALL) ALL
- peter ALL=(ALL) ALL
-
-
- 如果提升权限后无法cd到其他目录等,修改 /etc/passwd 文件,找到如下行,把用户ID修改为 0 ,如下所示:
- peter:x:500:500:peter:/home/lcy:/bin/bash
- 修改后如下
- peter:x:0:500:peter:/home/lcy:/bin/bash
https://blog.csdn.net/qq285744011/article/details/118293937
ssh-keygen -t rsa -C "你的邮箱地址"