Basic User Man Flashcards

1
Q

Where does useradd pick up defaults

A

/etc/default/useradd

/etc/login.defs

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

Create user3 with UID 1010, home directory /usr/user3a , and shell /bin/sh :

A

useradd -u 1010 -d /usr/user3 -s /bin/sh user3

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

Modify the login name for user2 to user2new, UID to 2000, home directory to /home/user2new, and login shell to /sbin/nologin.

A

usermod -l user2new -m -d /home/user2new -s /sbin/nologin -u 2000 user2

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

Remove user2new along with their home and mail spool directories

A

userdel -r user2new

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

Create user4 with non-interactive shell file

A

useradd -s /sbin/nologin user4

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