Basic User Man Flashcards
1
Q
Where does useradd pick up defaults
A
/etc/default/useradd
/etc/login.defs
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
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
4
Q
Remove user2new along with their home and mail spool directories
A
userdel -r user2new
5
Q
Create user4 with non-interactive shell file
A
useradd -s /sbin/nologin user4