Hoofdstuk 4 Flashcards

1
Q

(opdracht) zorg er voor dat niemand de file rights kan lezen, aanvullen of exporteren.

A

chmod 000 rights

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

wat moet je onderaan de sudoers file zetten om te zorgen dat user1 ook een sudoer wordt?

A

user1 ALL=(ALL) ALL

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

(opdracht) maak user1 aan met useradd en zorg dat er als commentaar ‘user een’ bij staat

A

useradd -c “user een” user1

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

wat zie je met het commando finger (username)

A
login
directory
when logged in
mails
plans
name
shell
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

hoe kan je de gegevens van een user achteraf makkelijk aanpassen?

A

chfn (username)

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

hoe kan je de uid en gid van een user bekijken?

A

id -u tm_user1
id -g tm_user1
of
id -ug tm_user1

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

(opdracht) Set the password for “tm_user1” to the value “tm_password1”. Make sure that this password can be kept for a maximum of 90 days and that a warning message appears after 85 days to inform the user if his password is about to expire.

A

Tm_user1@tm_user1-virtualbox:~$ passwd

hh@hh-virtualbox:~$ sudo passwd -x 90 -w 5 tm_user1

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

(opdracht) . If “tm_user1” does not change its password, make sure that it is blocked 10 days after the maximum expiry date.

A

Sudo chage -l tm_user1

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

(opdracht) lock, unlock and delete the passwd of user1

A

sudo usermod -L user1
sudo passwd -u user1
sudo passwd -d user1

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

(opdracht) Maak user2 administrator van de groep users

A

sudo usermod -a -G users user2

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

(opdracht) bekijk alle users die ingelogd zijn

A

sudo who

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

(opdracht) verander de groepsnaam users in all

A

sudo groupsmod -n all users

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

(opdracht) delelte de group all

A

sudo groupdell all

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

(opdracht)
To create users  now use the command “useradd” (!!):
Create “tm_user3” AND:
- Make sure that the home directory of “tm_user3” goes under the folder “/office”.
- Make sure that the GID of “tm_user3” is the same as the GID of “tm_user2”(1005).
- Make sure that “tm_user3” ends up in the group “tm_user2” in addition to being added to the group “tm_user3”.

A

sudo useradd -d /office -m -g 1005 -G 1005 tm_user3

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