section 11 - user accounts, groups, security Flashcards

1
Q

most account features are defined using comma-delineated lines where?

A

/etc/passwd

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

what is special about the password field in the passwd file?

A

it contains an X, which means that the real password is stored as a salted hash in another file called the /etc/shadow file which is owned by the root user unlike the /etc/passwd file:

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

What is a UID?

A

User identification number, used by the system to track user activity.

Similar to the domain name - IP address dynamic, the usernames are for human readability and UID for computer readability.

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

UIDs typically start where?

A

1000 or above, lower numbers reserved for system accounts.

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

What is a GID?

A

Group Identification Number; it is a collection of accounts with similar capabilities, policy, and shared access

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

What 7 fields are found in the /etc/passwd file?

A

Username (lowercase, no space)
Password (X)
UID (typically 1000 or higher)
GID
comment field (typically contains the user’s full name)
Home directory
Default shell (/bin/bash by default)

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

What file denotes that an account has been locked, password expired, deactivated, and other similar info?

A

An * or ! in the password field /etc/shadow file means the account is locked. Typically means the password was entered incorrectly too many times or expired.
Special flag is reserved for future use.

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

whoami

A

displays current username

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

id

A

displays username, UID, GID, groups

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

who

A

displays all active tty sessions, login times, and source

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

w

A

verbosely displays all active tty sessions including JCPU, PCPU, WHAT

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

what is JCPU

A

the total CPU time associated and a tty session as revealed by the w command

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

what is PCPU

A

the CPU consumption of currently running processes in a tty session as revealed by w command

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

what is WHAT

A

what the tty session is currently doing as revealed by the w command

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

How do you add a user account then verify it was properly added?

A

sudo adduser peanut (sudo useradd -m peanut)

grep ‘^peanut’ -nu /etc/passwd

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

what command would you use to see what groups a user is in?

A

id

17
Q

how can you check the password status of an account such as age?

A

passwd -S peanut

18
Q

how do you create a group?

A

groupadd “groupname”

19
Q

how to you join an account to agroup?

A

usermod -a -G “groupname”

20
Q

how do you change a group’s name?

A

groupmod -n newname oldname