DEV Community

Cover image for 1.Custom Apache User Setup
Thu Kha Kyawe
Thu Kha Kyawe

Posted on

1.Custom Apache User Setup

Lab Information

In the daily standup, it was noted that the timezone settings across the Nautilus Application Servers in the Stratos Datacenter are inconsistent with the local datacenter's timezone, currently set to Africa/Abidjan.

Synchronize the timezone settings to match the local datacenter's timezone (Africa/Abidjan).

Lab Solutions

🧭 Part 1: Lab Step-by-Step Guidelines

Step 1: Log in to the Jump Host

ssh thor@jump_host.stratos.xfusioncorp.com

# Password:

mjolnir123
Enter fullscreen mode Exit fullscreen mode

Step 2: SSH into App Server 2 (stapp02)

ssh steve@stapp02.stratos.xfusioncorp.com

# Password:

Am3ric@
Enter fullscreen mode Exit fullscreen mode

Step 3: Switch to root (required for user creation)

sudo -i
Enter fullscreen mode Exit fullscreen mode

Step 4: Create the Apache user javed

useradd -u 1902 -d /var/www/javed -m javed
Enter fullscreen mode Exit fullscreen mode

Step 5: Verify the user

id javed
Enter fullscreen mode Exit fullscreen mode

Expected output:

uid=1902(javed) gid=1902(javed) groups=1902(javed)

Step 6: Verify the home directory

ls -ld /var/www/javed
Enter fullscreen mode Exit fullscreen mode

Step 7 (Best Practice): Ensure correct ownership

chown javed:javed /var/www/javed
Enter fullscreen mode Exit fullscreen mode

🧠 Part 2: Simple Step-by-Step Explanation (Beginner Friendly)

Why use the jump host first?
The Stratos Datacenter is protected. All internal servers (like App servers) are accessed only through the jump host.

Why stapp02 specifically?
The task explicitly says “App server 2”, which maps to:

stapp02.stratos.xfusioncorp.com

Why do we switch to root?
Creating system users requires administrative (root) privileges.

What does the useradd command do here?

-u 1902 → sets the exact UID required by the lab

-d /var/www/javed → sets Apache-style home directory

-m → creates the directory automatically

javed → username

Why /var/www/ instead of /home/?
Apache application users are usually kept under /var/www to:

Match web server standards

Improve security isolation

Why verify after creation?
Labs are strict — verification confirms:

Correct UID

Correct directory

User exists successfully


Resources & Next Steps
📦 Full Code Repository: KodeKloud Learning Labs
📖 More Deep Dives: Whispering Cloud Insights - Read other technical articles
💬 Join Discussion: DEV Community - Share your thoughts and questions
💼 Let's Connect: LinkedIn - I'd love to connect with you

Credits
• All labs are from: KodeKloud
• I sincerely appreciate your provision of these valuable resources.

Top comments (0)