Group & User Creation Flashcards

1
Q

Add Admin group to your server

A

groupadd Admin

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

Create a user name Manuel and make Admin group his primary group

A

useradd Manuel -g Admin

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

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.

A

usermod Christina -G Security

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

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).

A

userdel Jackson

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

Delete the user Nina and home directory associate with this user from the system.

A

userdel Nina -r

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

rm -rf /home/Billie/

A

Remove user Billie’s home directory

Likely, after user was already deleted

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

You created a user Sabrina, but soon realized that she spells her name with a y. Change the user name from Sabrina to Sabryna.

A

usermod Sabrina -l Sabryna

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

Give user Alfie a password: ABcd1234

A

1) passwd Alfie

2) type and retype ABcd1234

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

gpasswd -a Titus Admin

A

Add user Titus to Admin group

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

gpasswd -d Gina Security

A

Remove user Gina from Security group

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

The Admin group needs limited access. Set password: 5678AdmN to the group.

A

1) sudo gpasswd Admin

2) type and retype 5678AdmN

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

gpasswd -r Security

A

Remove password from Security group

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

passwd -e

A

prompt user to change password at next login

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

passwd -d

A

delete a password for an account

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

Please lock Sarah’s user account after 5 failed attempts to login

A

passwd Sarah -l

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

Check the groups in which Michael belongs

A

groups Michael

or

cat /etc/group

or

id Michael

17
Q

How do I find the user id for Chip?

A

id Chip

or

cat /etc/passwd (field3)

18
Q

Set Debbie’s user account to have no access to the active shell

A

useradd Debbie -s /sbin/nologin