Skill 1 in course 2.1: Users and Automation
Users, Groups and sudo
Create and manage local accounts and groups, enforce password policy, and grant privileged access the controlled way.
You will be able to
- Create, modify, lock and delete local users with the right UID, home directory, shell and comment.
- Set passwords non-interactively, force a change at first login, and apply password aging with chage.
- Create and manage groups, tell primary from supplementary membership, and build a shared-access team.
- Grant privileged access through wheel and sudoers drop-in files, with specific commands where full root is too much, and verify the rules.
Lessons
- 01Creating and managing local user accountsKnow what an account is on disk, then create, change, lock and remove users with useradd, usermod and userdel.
useraddusermoduserdelidgetent/etc/passwd0/5 exercises - 02Passwords, aging and account policySet and reset passwords, force changes, and apply aging rules per user and as system defaults.
passwdchagepasswd --stdinchpasswd/etc/login.defs/etc/security/pwquality.conf0/5 exercises - 03Groups and shared accessCreate groups, add users correctly, understand primary versus supplementary membership, and build a shared project directory.
groupaddgroupmodgroupdelusermodgpasswdid0/5 exercises - 04Privileged access with sudoGive people the root powers they need and no more: wheel, drop-in sudoers files, command lists and passwordless rules.
sudovisudosudo -lsudo -uvisudo -c/etc/sudoers.d0/5 exercises