创建新用户

2020-05-15  本文已影响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用户

上一篇 下一篇

猜你喜欢

热点阅读