Domain 5 Flashcards

1
Q

UID of a root user and the first standard user

A

0 for a root user and 1001 for a standard user

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

Etc/passwd

A

Most account features defined here consist of a colon delimited lines were each record defines a single account

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

etc/shadow

A

Passwords are stored in this file, ordinary users cannot read, salt in hashed passwords are here

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

Why a standard user can execute the passwd command

A

uses the setUID bit and a user can only modify their own password

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

getent passwd

A

Similar to cat /etc/passwd, however not identical. cat /etc/passwd only defines local user accounts, getent passwd returns both local and accounts defined on network server

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

etc/group

A

Contains collections of groups defined on computer

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

whoami

A

Returns current account

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

id

A

Returns current accounts UID, GID, groups

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

who -q

A

Will count all users currently on the Linux machine

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

Alternative to who

A

w

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

su

A

Switch user if no username is specified then root is assumed

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

su -c

A

Will run a command as root

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

Sudo

A

Run a single command as root

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

useradd flags

A

c - comment
m - create a home directory
u - specify the uid eg 1008

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

Which folders does useradd modify?

A

etc/passwd
etc/shadow
etc/group

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

Sudo userdel -rf userguy

A

Will delete a user

17
Q

groupadd -g 1001 thisgroup

A

Create a gid of 1001

18
Q

usermod -aG thisgroup alec

A

Adds Alec to a group called thisgroup