Ch.4 Managing Linux Users and Groups Flashcards

1
Q

/etc/passwd is an example of what database?

A

flat-file database

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

changes a users last change date

A

chage -d YYYY-MM-DD

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

changes the current users UID, primary group ID and home directory as well as reads the new users profile which allows you to become exactly like the new user

A

su - <user></user>

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

changes the current users UID, primary group ID, and home directory

A

su <user></user>

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

chang a users ID or group command

A

usermod

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

contains a list of groups and their members

A

/etc/group

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

contains user account information

A

/etc/passwd

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

difference between a user and system accounts

A

System accounts cannot log on to the system, do not require a password, and do not have home directories

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

Displays password aging information

A

passwd -S
or
chage -l <user></user>

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

format for a record in the /etc/passwd file

A

user_name:password:UID:GID:comment:home_directory:default_shell

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

how are user account ID ranges specified?

A

by variables UID_MIN and UID_MAX in /etc/login.defs

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

How can you tell a user is disabled in /etc/shadow?

A

user account has * in the password field

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

how to change a users aging info with a user interface

A

chage <user></user>

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

How to create a skeleton directory for users with similar needs?

A
  1. Create a directory named /etc/skel_<group_name>/</group_name>
  2. copy all files in /etc/skel/ to that directory, edit the appropriate config files, and add any additional files desired into the new directory.
  3. adding users to that group use the option -k
    useradd -k /etc/skel_<groupname> <username></username></groupname>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

information for users and groups are stored where?

A

/etc/passwd
/etc/shadow
/etc/group

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

Linux method to permit or restrict access to files

A

discreationary access control (DAC)

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

Linux supports a more granular permission structure called? What are these rights controlled by?

A

Mandatory Access Control (MAC)

Controlled by SElinux or AppArmor

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

removes all of the users secondary groups and replaces them with a new secondary group

A

usermod -G <groupname></groupname>

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

sets the account expiration date

A

chage -E YYYY-MM-DD

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

sets the default number of days after a password expires for the account to become inactive

A

useradd -Df <number></number>

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

sets the minimum number of days required before a password can be changed

A

passwd -n

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

sets the number of days prior to password expiration, when the user will be warned of pending expiration

A

chage -W

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

The user account ID for a service is in the range

A

0-99 or between the values set by SYS_UID_MIN and SYS_UID_MAX in /etc/login.defs

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

useradd command obtains default values initially from ____ and next from ____

A

initially form /etc/login.defs and next from /etc/default/useradd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
these commands do not remove any groups from /etc/group
userdel or userdel -r
26
unlocks the user account
passwd -u
27
what UID is the default minimum and what is the default maximum UID
Minimum UID 1000 Maximum UID 60000
28
what account is UID 0
root
29
what are the fields format in /etc/group?
Group:password:GID:userlist
30
what command creates a system account
useradd --system
31
what does !! in /etc/shadow mean?
an account password has never been assigned
32
What file directory would you modify if you want all new users to have specific files or settings?
/etc/skel/
33
what kind of database is /etc/group
a flat-file database
34
what will you see in a system accounts default shell portion in the /etc/passwd format?
/sbin/nologin or /bin/false
35
what would you see in /etc/shadow for an account thats locked by passwd -l
!! preceding the encrypted password
36
when using the useradd command, any require setting not specified are supplied where?
/etc/login.defs and /etc/default/useradd
37
where does the min_days password default value get stored?
/etc/login.defs
38
where is group information stored?
/etc/group and /etc/gshadow
39
where is the default password INACTIVE value specified?
/etc/default/useradd
40
adds a new secondary group
usermod -aG
41
changes the location of the users home directory
usermod -d
42
changes the username (logon name)
usermod -l
43
command sys admins use to create user accounts
useradd
44
command that displays all logged on users but not the processes they are executing
who
45
command to change other users passwords as root
passwd
46
command to display the current UID or GID
id
47
command to modify an existing user
usermod
48
command to remove a user and the users home directory and mail
userdel -r
49
command to rename user student2 to user2
usermod -l user2 -d /home/user2 -m student2
50
command to specify which user to display UID, GID and primary group ID
id
51
command to view the default values set in /etc/default/useradd
useradd -D
52
contains user password and password aging information
/etc/shadow
53
displays password aging for a specific user
chage -l
54
displays the UID of all logged on users, what processes they are executing and what devices the processes are executing from
w
55
for better security, admins set password rules with
chage
56
format for a record in /etc/shadow
username:password:last_modified:min_days:max_days:warn_days:inactive:expire
57
how to open a text terminal
ctrl + alt + f2
58
locks the user account but does not remove the current password
passwd -l
59
moves (renames) the current users home directory to the new users name
usermod -m
60
non-privileged accounts created by a sys admin or application
service or system accounts
61
removes a user account
userdel
62
set the default absolute path to the location of the home directory in /etc/default/useradd
useradd -Db
63
sets INACTIVE
chage -I
64
sets the default absolute path to the default shell in etc/default/useradd
useradd -Ds
65
sets the defualt expiration date in /etc/default/useradd
useradd -De
66
sets the max number of days before a password must be changed
passwd -x
67
sets the max number of days before a password must be changed
chage -M
68
sets the min number of days required before a password can be changed
chage -m
69
sets the number of days prior to password expiration. When the user will be warned of the pending expiration
passwd -w
70
sets the number of inactive days to wait after a password has expired before disabling the account
passwd -i
71
to change default primary group in /etc/default/useradd
useradd -Dg
72
used to populate the new users home directory
/etc/skel/
73
user sets a password with
passwd
74
useradd option that allows an administrator to manually specify a user ID
useradd -u
75
useradd option that creates the home directory
useradd -m not necessary if the variable CREATE_HOME in /etc/login.defs is yes
76
useradd option that defines the location of the home directory
useradd -d
77
useradd option that specifies that the user being created is a system user
useradd -r range specified by SYS_UID_MIN and SYS_UID_MAX in /etc/login.defs
78
useradd option that specifies the absolute path to the default shell for the user
useradd -s
79
useradd option that specifies the date when the user will be disabled
useradd -e YYYY-MM-DD
80
useradd option that specifies the users secondary group memberships
useradd -G
81
useradd option to leave a user comment field
useradd -c
82
what changes are advisable to change due to the default aging setting being a security risk?
Change INACTIVE=30 in /etc/default/useradd default minimum, maximum warning days in /etc/login.defs
83
what must you do if you do not rm a user with the userdel -r command
manually delete a users home directory, cron jobs, at jobs and mail
84
groups provide what for multiple users
common access to a system resource
85
command to add groups
groupadd
86
format for the group add command
groupadd
87
group add option specifies a GID for the new group.
groupadd -g
88
groupadd option that specifies that the group being created is a system group
groupadd -r
89
used to manage the files /etc/group and /etc/gshadow
gpasswd
90
command to assign a group administrator
gpasswd -a command
91
gpasswd option that adds a user to the group
-a
92
gpasswd option that deletes a user from the group
gpasswd -d
93
gpasswd option that removes the group password
gpasswd -r
94
command used to modify group information
groupmod
95
groupmod option that changes the groups GID number
groupmod -g
96
groupmod option that changes the group name
groupmod -n
97
command to delete an existing group from the system
groupdel
98