
Day 5: Managing Users, Groups, and Shells in Linux π§
Day 5 of my #1HourADayJourney. Today, I moved from file security to Identity Management . If you are managing a database server, you need to know exactly who has access to your system and what level of privileges they hold. π οΈ Key Commands Practiced 1. The User Lifecycle Managing users is the first step in system administration. Here is how I handled the user lifecycle: # Creating a user with a home directory sudo useradd -m bob # Setting/Updating the password sudo passwd joker # Deleting a user and their home directory sudo userdel -r bob 2. Modifying User Attributes Sometimes a user needs a different shell or a specific home directory. I used usermod to reconfigure them: # Changing the home directory sudo usermod -d /home/wayne joker # Changing the login shell (e.g., to bash) sudo usermod -s /bin/bash joker 3. Privilege Escalation Not every user should have administrative rights. I practiced adding a user to the sudo group, which grants them the power to execute commands as the root
Continue reading on Dev.to
Opens in a new tab

