User Management
User management in Linux is a crucial aspect of DevOps and system administration. Managing users and their permissions ensures that your systems are secure, organized, and meet the needs of your organization. Here’s an overview of user management in Linux within a DevOps context:
1 . Creating a User : To create a new user in Linux, you can use the useradd command. For example:
sudo useradd [usernam]
2. Setting a Password: After creating a user, set a password using the passwd command:
sudo passwd [username]
3. Deleting a User: To delete a user, use the userdel command :
sudo userdel [username]
4. Switch to Another User: The su command allows you to switch to another user’s account by providing the username as an argument. To exit from the user’s account and return to your original session, you can simply type ‘exit’.
su [USER NAME]
5. Rename the User: To change the username from the current name (oldname) to the new name (newname), use the following command.
sudo usermod -l [newname] [oldname]
Linux command in DevOps
Linux fundamentals are crucial skills for a DevOps professional. Through this article, we will learn about all the required Linux commands which we will frequently use in a DevOps career.