107.1 Manage User And Group Accounts And Related System Files Flashcards

1
Q

Command that allows an ordinary user to delete a group.

A

sudo groupdel [group]

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

List the members of the sales group.

A

getent group sales

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

List all groups.

A

cat /etc/group

getent group | cut -d: -f1

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

Argument that specifies the absolute path to the user’s home directory when adding a new user.

A

useradd -d [path] [name]

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

useradd cannot be used to grant administrative privileges. (T/F)

A

True

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

Command with argument to delete a user, remove their home directory and files, and mail.

A

userdel –remove

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

Delete a user even if they are logged in.

A

userdel –force

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

usermod can be used to:

A
  1. add comments
  2. modify or move the home directory
  3. set account expiry
  4. change the user’s primary group
  5. add the user to additional groups
  6. remove a user from a group
  7. lock and unlock the user account
  8. specify the user’s shell
  9. set the user’s ID
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

usermod cannot be used to:

A
  1. delete any groups

2. change access permissions for a user

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

Command to create a system group.

A

groupadd -r

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

Commands that can be used to change a group’s password:

A

gpasswd, groupadd, groupmod

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

groupmod does not do what?

A

Add users to a group.

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

Command to change group ownership.

A

chgrp

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

chgrp cannot change what?

A

The group password.

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

Any user can run which command to see when their password will expire?

A

chage

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

Path to file that defines all login configurations, including password age and length, user ID and group ID ranges, password encryption levels, permitted terminal types, and more.

A

/etc/login.defs

17
Q

Path to the text database that lists users.

A

/etc/passwd

18
Q

Path to directory that contains default template files and directories that are copied to a new user profile.

A

/etc/skel

19
Q

/etc/shadow contains:

A
  1. the username (but not the full name)
  2. the encrypted password
  3. the number of days since January 1st 1970 that the password was last changed
  4. the number of days before the password may be changed
  5. the number of days before the password must be changed
  6. when the account will be disabled after the password expires
  7. the number of days since the account has been disabled
20
Q

/etc/group contains:

A
  1. the group name
  2. the group password
  3. the group ID
  4. list of member users