User & Group Administration
Objective
Hands-on practice with user & group administration in a Linux environment.
Tools & Technologies
useraddusermodgroupaddpasswdsudo
Key Commands
useradd -m -s /bin/bash -G sudo aliceusermod -aG docker bobpasswd alicevisudoLab Steps
01
Creating Users
Create users with useradd, setting home directory, shell, and initial groups.
02
Group Management
Create groups and add users to supplementary groups with usermod -aG.
03
Password Policy
Set passwords and configure expiry with chage and /etc/login.defs.
04
sudo Access
Configure sudo access via /etc/sudoers using visudo for safe editing.
Challenges Encountered
- usermod -G replaces all groups — use -aG to append
- visudo prevents syntax errors that could lock you out
Key Takeaways
- Never edit /etc/sudoers directly — always use visudo
- Use /etc/sudoers.d/ for modular sudo configuration