Managing User and Groups Flashcards

* How to manage users and groups. * Where user and group information resides * how to CRUD users/groups

1
Q

Where is the users metadata information store?

A

/etc/passwd

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

are the password stored as plain text in etc/password?

A

No, they are encrypted.

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

What’s the maximum length of characters in a username by convention?

A

8 characters.

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

Are usernames case sensitive

A

Yes

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

Where are password of users stored

A

/etc/shadow

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

What’s the UID of the root user?

A

0 -> zero

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

Which command should we use for adding a user?

A

useradd -c “Name of the person” -m -s /bin/bash username

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

Which command should we use for adding a password to a user?

A

passwd

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

How to create an account that doesn’t have access to the shell?

A

We have to pass to the shell option /usr/sbin/nologin, this is useful when creating accounts for services.

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

which command should we use to delete a user?

A

userdel

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

which command should we use to update a user?

A

usermod

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

Where are group details stored?

A

/etc/group

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

which command should we use to create groups?

A

groupadd

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

which command should we use to delete a group?

A

groupdel

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

which command should we use to modify a group?

A

groupmod

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

which command can we use to see the information of a user or group?

A

id