美文网首页
创建新用户

创建新用户

作者: 茶馆先生的马褂 | 来源:发表于2020-05-15 15:52 被阅读0次

以root用户登录
useradd -r -m -s /bin/bash [username]
ll home
cd /home
chmod +w sudoers
ll
vi sudoers增加docker ALL=(ALL:ALL) ALL
chmod -w sudoers
groupadd [name]
usermod -g [name] [username]
id username
切换用户
su - [username]


详见https://www.cnblogs.com/SH170706/p/10359313.html


用户切换
docker [密码]
su docker
cd
ls

su root 切换回root用户

相关文章

网友评论

      本文标题:创建新用户

      本文链接:https://www.haomeiwen.com/subject/moqrohtx.html