Linux 命令行账户管理

执行 `sudo vi /etc/suduers`, 然后输入:

`username ALL=(ALL) NOPASSWD: ALL`

“`
useradd -m USERNAME # add a user
userdel USERNAME # delete a user
passwd -e # password expire next time user login

groups username # view username groups
usermod -G groupname username # add user to a group
usermod -g groupname username # set user to a group

newgrp
make newly added group work immediately without login/out
“`

chsh 提示输入密码的问题

“`
Changing /etc/pam.d/chsh: from:

auth required pam_shells.so
to

auth sufficient pam_shells.so
“`

About 逸飞

后端工程师

发表评论

电子邮件地址不会被公开。 必填项已用*标注