新建一个用户
useradd webadmin
为用户配置密码
passwd webadmin
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
查看用户详情
cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
...
webadmin:x:1000:1000::/home/webadmin:/bin/bash
用户详情对应名称
root:x:0:0:root:/root:/bin/bashusername:password:Uid:Gid:description:homepath:loginmethod
编辑用户配置
vi /etc/passwd
将 webadmin:x:1000:1000::/home/webadmin:/bin/bash 修改为 webadmin:x:0:0::/home/webadmin:/bin/bash
已将该用户从普通用户权限更改为 root 权限
cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
...
webadmin:x:0:0::/home/webadmin:/bin/bash
何星星原创文章仅用于个人学习,当前页面暂不支持复制操作,了解详情或文章转载请 点此 继续!
0 条评论