|
| 1 | +# Day 09 – Linux User & Group Management Challenge |
| 2 | + |
| 3 | +## Task |
| 4 | +Today's goal is to **practice user and group management** by completing hands-on challenges. |
| 5 | + |
| 6 | +Figure out how to: |
| 7 | +- Create users and set passwords |
| 8 | +- Create groups and assign users |
| 9 | +- Set up shared directories with group permissions |
| 10 | + |
| 11 | +Use what you learned from Days 1-7 to find the right commands! |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Expected Output |
| 16 | +- A markdown file: `day-09-user-management.md` |
| 17 | +- Screenshots of command outputs |
| 18 | +- List of commands used |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## Challenge Tasks |
| 23 | + |
| 24 | +### Task 1: Create Users (20 minutes) |
| 25 | + |
| 26 | +Create three users with home directories and passwords: |
| 27 | +- `tokyo` |
| 28 | +- `berlin` |
| 29 | +- `professor` |
| 30 | + |
| 31 | +**Verify:** Check `/etc/passwd` and `/home/` directory |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +### Task 2: Create Groups (10 minutes) |
| 36 | + |
| 37 | +Create two groups: |
| 38 | +- `developers` |
| 39 | +- `admins` |
| 40 | + |
| 41 | +**Verify:** Check `/etc/group` |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +### Task 3: Assign to Groups (15 minutes) |
| 46 | + |
| 47 | +Assign users: |
| 48 | +- `tokyo` → `developers` |
| 49 | +- `berlin` → `developers` + `admins` (both groups) |
| 50 | +- `professor` → `admins` |
| 51 | + |
| 52 | +**Verify:** Use appropriate command to check group membership |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +### Task 4: Shared Directory (20 minutes) |
| 57 | + |
| 58 | +1. Create directory: `/opt/dev-project` |
| 59 | +2. Set group owner to `developers` |
| 60 | +3. Set permissions to `775` (rwxrwxr-x) |
| 61 | +4. Test by creating files as `tokyo` and `berlin` |
| 62 | + |
| 63 | +**Verify:** Check permissions and test file creation |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +### Task 5: Team Workspace (20 minutes) |
| 68 | + |
| 69 | +1. Create user `nairobi` with home directory |
| 70 | +2. Create group `project-team` |
| 71 | +3. Add `nairobi` and `tokyo` to `project-team` |
| 72 | +4. Create `/opt/team-workspace` directory |
| 73 | +5. Set group to `project-team`, permissions to `775` |
| 74 | +6. Test by creating file as `nairobi` |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Hints |
| 79 | + |
| 80 | +**Stuck? Try these commands:** |
| 81 | +- User: `useradd`, `passwd`, `usermod` |
| 82 | +- Group: `groupadd`, `groups` |
| 83 | +- Permissions: `chgrp`, `chmod` |
| 84 | +- Test: `sudo -u username command` |
| 85 | + |
| 86 | +**Tip:** Use `-m` flag with useradd for home directory, `-aG` for adding to groups |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Documentation |
| 91 | + |
| 92 | +Create `day-09-user-management.md`: |
| 93 | + |
| 94 | +```markdown |
| 95 | +# Day 09 Challenge |
| 96 | + |
| 97 | +## Users & Groups Created |
| 98 | +- Users: tokyo, berlin, professor, nairobi |
| 99 | +- Groups: developers, admins, project-team |
| 100 | + |
| 101 | +## Group Assignments |
| 102 | +[List who is in which groups] |
| 103 | + |
| 104 | +## Directories Created |
| 105 | +[List directories with permissions] |
| 106 | + |
| 107 | +## Commands Used |
| 108 | +[Your commands here] |
| 109 | + |
| 110 | +## What I Learned |
| 111 | +[3 key points] |
| 112 | +``` |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | + |
| 117 | +## Troubleshooting |
| 118 | + |
| 119 | +**Permission denied?** Use `sudo` |
| 120 | + |
| 121 | +**User can't access directory?** |
| 122 | +- Check group: `groups username` |
| 123 | +- Check permissions: `ls -ld /path` |
| 124 | + |
| 125 | +--- |
| 126 | + |
| 127 | +## Submission |
| 128 | +1. Fork this `90DaysOfDevOps` repository |
| 129 | +2. Navigate to `2026/day-09/` folder |
| 130 | +3. Add your `day-09-user-management.md` with screenshots |
| 131 | +4. Commit and push |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +## Learn in Public |
| 136 | +Share your Day 09 progress on LinkedIn: |
| 137 | + |
| 138 | +- Post about completing the user management challenge |
| 139 | +- Share one thing you figured out |
| 140 | +- Mention real-world DevOps use |
| 141 | + |
| 142 | +Use hashtags: |
| 143 | +``` |
| 144 | +#90DaysOfDevOps |
| 145 | +#DevOpsKaJosh |
| 146 | +#TrainWithShubham |
| 147 | +``` |
| 148 | + |
| 149 | +Happy Learning |
| 150 | +**TrainWithShubham** |
0 commit comments