Files
it-knowledge/src/solutions/user-management.md
T

46 lines
1.2 KiB
Markdown
Raw Normal View History

2025-02-20 19:38:02 -06:00
# User Management Solutions
This section contains my solutions to various user management scenarios from the practice exercises.
## Scenario: Creating Users with Specific Requirements
### Original Problem
From Practice Scenarios v3: Create a user named 'john' with a custom shell and home directory.
### Environment
- OS Version: Rocky Linux 8.x
- Initial State: No user 'john' exists
- Required Outcome: User 'john' created with specific requirements
### Solution Steps
1. Create the user with specific requirements
```bash
# Create user with custom home directory
sudo useradd -m -d /custom/home/john -s /bin/bash john
# Set password
sudo passwd john
```
This creates the user 'john' with a custom home directory and bash shell
2. Verify user creation
```bash
# Check user entry in /etc/passwd
grep john /etc/passwd
# Verify home directory
ls -la /custom/home/john
```
### Key Learnings
- Understanding of useradd command options
- Importance of verifying user creation
- Best practices for user management
## Skills Demonstrated
- User Account Management
- Command Line Proficiency
- Security Best Practices
- System Verification
[Additional scenarios will be documented here as they are completed]