linux user and group exercises solutions
- Find out what user are you currently logged in as
- List all users
- How to find who is logged in?
- Create a user
- How to delete a user
userdel $USER
uderdel --remove $USER
- Get information about a user such as UID and GID
- What files store password information and how do they work?
- Change default settings for a new user, where is the helper file?
- /etc/default/useradd and /etc/login.defs
- How to manage passwords?
-
TODO
- How to set minimum password requirements
- How to check what accounts have a password set
- Get password information on specific user
- Password flags
- -n , number of days between password change
- -w, set warning days
- -x, Max number of days between password change
- Password expires at certain date
- How to manage user environments?
- Where is the default home holder for new users?
- Where are user environments
- /etc/profile
- /etc/bashrc
- ~/.profile
- ~/.bashrc
- Where can one find a list of all groups?
- /etc/group
- Group name
- Group password
- Group ID
- Members
- List all groups
- Create a group
- How to delete a group?
- How to add a user to a group?
- Change group that owns a file
- Add user to a group
- RHEL
usermod -aG $GROUP_NAME $USER
- How to give sudo access
- RHEL
usermod -aG wheel $USER
- Set default UID and password age?
- page 122
- /etc/default/useradd has some stuff
- /etc/login.defs has what I am looking for