$ ls ~yifei/notes/

Linux 命令行账户管理

Posted on:

Last modified:

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

username ALL=(ALL) NOPASSWD: ALL

users

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

© 2016-2022 Yifei Kong. Powered by ynotes

All contents are under the CC-BY-NC-SA license, if not otherwise specified.

Opinions expressed here are solely my own and do not express the views or opinions of my employer.