5.2 Security - Creating Users and Groups Flashcards

1
Q

What command would you use to delete the user stosh?

A) deluser stosh
B) rmuser stosh
C) rm -u stosh
D) userdel stosh

A

userdel stosh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

useradd -m stosh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

usermod -a -G linuxacademy stosh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

cat /etc/group | grep stosh
groups stosh
id stosh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

passwd -l stosh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly