5.2 Security - Creating Users and Groups Flashcards
What command would you use to delete the user stosh?
A) deluser stosh
B) rmuser stosh
C) rm -u stosh
D) userdel stosh
userdel stosh
Which of the following commands will create the user stosh and the home directory at the same time with defaults?
A) useradd -m stosh
B) useradd –home stosh
C) useradd stosh
D) useradd -D stosh
useradd -m stosh
Which of the following commands will add the user stosh to the group linuxacademy (as the non-primary group)?
A) usermod -a -G linuxacademy stosh
B) usermod -a -c linuxacademy stosh
C) usermod -a -s linuxacademy stosh
D) usermod -a -g linuxacademy stosh
usermod -a -G linuxacademy stosh
What commands would you use to see the group membership of the user stosh?
A) cat /etc/group | grep stosh
B) groups stosh
C) id stosh
D) lsgroups stosh
cat /etc/group | grep stosh
groups stosh
id stosh
Which of the following commands will lock the password for the user stosh?
A) lockusr -l stosh
B) passwd -l stosh
C) userlock -u stosh
D) lock stosh
passwd -l stosh