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]

sudo useradd w3wiki

w3wiki user created

2. Setting a Password: After creating a user, set a password using the passwd command:

 sudo passwd [username]

setting password for w3wiki user

3. Deleting a User: To delete a user, use the userdel command :

sudo userdel  [username]

deleting user w3wiki

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]

Switch to user w3wiki

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]

chnage the user name from w3wiki to GFG

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.

Similar Reads

What is linux?

Linux is a free and open-source software operating system , which developed by linus torvalds. It came from a unix family. it is compatibility with all major computer hardware such as x86 , ARM etc....

File System in Linux

In linux everything is represented as a file including a hardware program, the files are stored in a directory , and every directory contains a file with a tree structure. That is called file system hierarchy. Linux uses single rooted , inverted tree like structure. Root directory represents with / (forward slash). it is a top-level directory in linux....

Basic command

1. The `pwd` command helps you identify your location in the file system :...

Creating Files and Directories :

In DevOps, creating and managing files and directories is a common task. Here are some essential commands :...

Copying and Pasting Files and Directories:

The cp command is used for copying and pasting files or directories in Linux. Here are some commonly used options and examples:...

Removing Files and Directories:

To delete files or directories in DevOps, you can use the rm command. Be cautious, as it permanently removes data. Here’s an example:...

rm Renaming Files and Directories

The mv command is used to rename files or directories. For example, to rename a directory from “gfg” to “gfg-devops,” you can use:...

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:...

Group Management :

A group is a collection of user accounts that is very use full to administrators for managing and applying permission to a number users....

Linux file system permission :

In linux , to increase the security of the file and directory. we need to used permission. There are total three type of file permission are Read , Write , Execute....

Conclusion

In conclusion, this article has emphasized the vital role of Linux fundamentals in the toolkit of a DevOps professional. By providing insights into essential Linux commands and concepts, it equips individuals in the field to efficiently navigate file systems, manage users and groups, implement file permissions, and perform a variety of tasks critical for the success of DevOps operations, ultimately contributing to the security and functionality of their systems....