RHCSA Ch5 Flashcards

1
Q

delete user and home directory

A

userdel -r bob

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

modify a user

A

usermod

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

usermod specify home dir

A
  • d homedir

- m =to move directory

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

Change user ID

A

-u 1234

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

usermod change primary group ID

A

-g 1234

group must exist first

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

usermod append to existing settings

A

-a

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

usermod change login name

A

-l name

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

usermod lock or unlock account

A
  • L

- U

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

add a new group

A

groupadd -g 1010 jane

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

Delete password

A

passwd -d user

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

expire password

A

passwd -e user

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

Lock password

A

passwd -l user

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

Unlock password

A

passwd -u user

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

Password Output status

A

passwd -S user

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

how do you know if a users password is locked?

A

The password hash in /etc/shadow will begin with !!
or
sudo passwd -S brian

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

where are password parameters stored

A

/etc/security/pwquality.conf

17
Q

where is the password aging parameters stored

A

/etc/login.defs

18
Q

how to change password aging?

A

chage [option]

  • d = last day account is active = -d 0 = will force user to reset password on next login
  • E = expire date = sudo chage -E 2025-01-01 brian
  • I = inactive days (capital i)
  • m = Minimum days until change
  • M = Max days valid
  • W - warn days
  • l = list
19
Q

add a new goup

A

sudo groupadd -g 1050 accounting

20
Q

change a group id number

A

sudo groupmod -g 1051 accounting

21
Q

place brian in the the account group

A

sudo gpasswd -a brian accounting
sudo usermod -a -G accounting brian
-a = append

22
Q

give a group a password

A

sudo gpasswd accounting

23
Q

list what groups you are apart of

A

groups

24
Q

change into a group that you do not belong to

A

newgrp accounting

25
Q

make brian an admin of the accounting group

A

sudo gpasswd -A brian accounting

then you have to re-add brian if you want him to administer the group and be apart of it

26
Q

who are you logged in as

A

whoami

27
Q

who did you log in as

A

logname

28
Q

how to configure sudoer config file

A

edit /etc/sudoers
or
sudo visudo

29
Q

what group allows users to use sudo on all commands

A

wheel group