Group & User Creation Flashcards
Add Admin group to your server
groupadd Admin
Create a user name Manuel and make Admin group his primary group
useradd Manuel -g Admin
You created a user Christina earlier, but now realize that she needs to be added to the Security group, which is her secondary group. Make this addition to Christina’s user account.
usermod Christina -G Security
Jackson is no longer a part of the company. You are instructed to remove his user account from the system. Please remove the user Jackson (but keep his home directory).
userdel Jackson
Delete the user Nina and home directory associate with this user from the system.
userdel Nina -r
rm -rf /home/Billie/
Remove user Billie’s home directory
Likely, after user was already deleted
You created a user Sabrina, but soon realized that she spells her name with a y. Change the user name from Sabrina to Sabryna.
usermod Sabrina -l Sabryna
Give user Alfie a password: ABcd1234
1) passwd Alfie
2) type and retype ABcd1234
gpasswd -a Titus Admin
Add user Titus to Admin group
gpasswd -d Gina Security
Remove user Gina from Security group
The Admin group needs limited access. Set password: 5678AdmN to the group.
1) sudo gpasswd Admin
2) type and retype 5678AdmN
gpasswd -r Security
Remove password from Security group
passwd -e
prompt user to change password at next login
passwd -d
delete a password for an account
Please lock Sarah’s user account after 5 failed attempts to login
passwd Sarah -l