User and Group Management Flashcards

1
Q

cat useradd

A

Create a new user or update default new user information
- change default home directory
-update users default group
- set expiration date for disablement

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

groupadd

A

create a new group
- set group ID different then default one upon creation
-specify group as a system group

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

usermod

A

modify a user account
-change users group membership
-change user ID
-update group membership

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

groupmpod

A

modify a group definition on the system
-update group ID and name of group

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

userdel

A

delet a user account and related files
-r remove files in home directory

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

groupdel

A

delete a group
-you cannot remove a group that is a primary group for an existing user, first user must be deleted

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

passwd

A

change users password. The super user can change password for any user
- to change your own password type passwd
-to change another users password as a root or superuser type passwd and user name

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

How do you see a group ID?

A

cat /etc/group and scroll down to the group you created

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

What is the command to update a groupID and add a new group

A

groupadd -g 1200 ops

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

What is the command to see the ID for a user?

A

ID clark or whatever username they have

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

How do you create a new user without a default home directory but instead assign it to a new group you create?

A

useradd -M -g ops barry (-M will not create a home directory for the user) (-g will create a group)

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

Command to see list of users

A

cat /etc/passwd

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

ll /home/

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

usermod -G dev, ops -u 1300 clark

A

this updates clarks groups to dev and ops and their id

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

groupmod - n dev2 dev

A

This command modifies the name of dev using -n option and changes it to dev2 to see this change do id clark and notice the group name he is assigned to is no longer dev the ID doesnt change

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

Chane home directory for a user

A

usermod -d /home/flash barry

17
Q

How do you switch to a user?

A

su - barry