User
-
Add user
# do all the defaults: create home, select shell, prompt for password. adduser hawkey # do nothing useradd hawkey useradd -d /home/hawkey -s /bin/bash passwd hawkey # change passwordbash -
Delete user
userdel hawkey userdel -r hawkey # delete homebash -
switch user
su hawkey su # rootbash -
add user to group
usermod -aG gbash -
add sudoer
# recommend use this! usermod -aG sudo hawkeybashOr
visudo # however, this is nano vim /etc/sudoersbashand append a line:
hawkey ALL=(ALL) NOPASSWD:ALL -
Change shell
chsh -s /bin/bash # but never change shell for root !!!bashOr
vi /etc/passwdbashand modify the corresponding line.