Managing User and Groups Flashcards
* How to manage users and groups. * Where user and group information resides * how to CRUD users/groups
Where is the users metadata information store?
/etc/passwd
are the password stored as plain text in etc/password?
No, they are encrypted.
What’s the maximum length of characters in a username by convention?
8 characters.
Are usernames case sensitive
Yes
Where are password of users stored
/etc/shadow
What’s the UID of the root user?
0 -> zero
Which command should we use for adding a user?
useradd -c “Name of the person” -m -s /bin/bash username
Which command should we use for adding a password to a user?
passwd
How to create an account that doesn’t have access to the shell?
We have to pass to the shell option /usr/sbin/nologin, this is useful when creating accounts for services.
which command should we use to delete a user?
userdel
which command should we use to update a user?
usermod
Where are group details stored?
/etc/group
which command should we use to create groups?
groupadd
which command should we use to delete a group?
groupdel
which command should we use to modify a group?
groupmod