Linux 命令行账户管理


Author: yifei / Created: May 29, 2017, 8:40 p.m. / Modified: May 29, 2017, 8:43 p.m. / Edit

type EDITOR=vi sudo visudo, in the bottom of the file, type the follow:

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

评论区