Today was a heavy Linux focus day. I spent time exploring the internal directory structure and leveling up my user management skills. Here is a breakdown of what I covered and the commands I explored.
- The Linux Internal Folder Structure I explored the root directory (/) to better understand the Filesystem Hierarchy Standard (FHS).
/boot: Static files of the boot loader.
/etc: Host-specific system-wide configuration files.
/home: User home directories.
/proc: Virtual filesystem providing process and kernel information as files.
Tip: Using the tree -L 1 / command is a great way to visualize this.
- User Management: The Essentials I refreshed my memory on the daily driver commands for managing access:
Bash
# Adding a new user
sudo useradd -m newuser
# Assigning a password
sudo passwd newuser
# Deleting a user
sudo userdel -r newuser
- What's New: Advanced User Management I dug deeper into some specific flags and concepts I hadn't used much before:
Locking an account: Instead of deleting a user, you can lock them out.
Bash
sudo usermod -L username
Checking Password Status: Using passwd -S to see if an account is locked, has no password, or is active.
Understanding /etc/shadow: I learned how to read the fields in the shadow file to understand password aging and encryption methods.
Conclusion
Solidifying these basics is crucial for any Cloud or DevOps role. Understanding the difference between /bin and /sbin or knowing how to manually expire a user account gives you much more control over the system.
What are some obscure Linux user management commands you use? Let me know in the comments!
Linkedin: https://www.linkedin.com/in/dasari-jayanth-b32ab9367/
Top comments (0)