Stop new users from inheriting bad habits from the skeleton directory

User & Group Management

Stop new users from inheriting bad habits from the skeleton directory

🧩 The Challenge

Setting up a new server and realize every user ends up with a bunch of junk files in their home directory because the default /etc/skel is full of trash left by some previous admin. It drives me nuts having to manually purge bash history and random configs every time I add a user.

💡 The Fix

Just create a dedicated, clean directory to act as your template instead of letting the system use the bloated default. It keeps your onboarding process predictable and saves you the headache of cleaning up after your own tools.

useradd -m -k /etc/skel.clean new_user_name

⚙️ Why It Works

Passing the -k flag tells the system to copy your customized set of skeleton files instead of the standard ones, meaning you keep the clutter out of new home directories.

🚀 Pro-Tip: Check your /etc/default/useradd file to change the system-wide default template if you are tired of typing the flag every single time.

Linux Tips & Tricks | © ngelinux.com | 8/9/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted