Initial Settings : Add New Users2019/07/10 |
[1] | If you'd like to add new users, Add like follows. |
# add a user [buster] root@dlp:~# adduser buster Adding user `buster' ... Adding new group `buster' (1001) ... Adding new user `buster' (1001) with group `buster' ... Creating home directory `/home/buster' ... Copying files from `/etc/skel' ... New password: # set user's password Retype new password: # confirm passwd: password updated successfully Changing the user information for buster Enter the new value, or press ENTER for the default Full Name []: # input some informations (or possible to keep empty) Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] yroot@dlp:~# |
[2] | If you'd like to limit users to switch to root user account, configure like follows. For example, Configure that only [buster] user can switch to root account with [su] command. |
root@dlp:~# usermod -aG adm buster
root@dlp:~#
vi /etc/pam.d/su # line 15: uncomment and add the group
auth required pam_wheel.so group=adm
|
[3] | If you'd like to remove user accounts, Configure like follows. |
# remove a user [buster] (only removed user account) ubuntu@dlp:~$ deluser buster
# remove a user [buster] (removed user account and his home directory) ubuntu@dlp:~$ deluser buster --remove-home
|
Sponsored Link |