【 Create Users in Linux 】 Step by Step Guide ▷ 2022

One of the outstanding features of Linux is its multi-user function.which allows several people to access the applications and resources of the server at the same time without putting your safety at risk.

So that users can interact seamlessly, administrator is required to assign credentials which will be verified at the time of entry. The process is not complicated at all, but the method must be followed precisely to prevent errors from occurring that They force us to start from scratch.

However What is the way to create users in Linux no matter what distribution you have installed? That is one of the questions we are going to answer in this course. Besides, we will detail how to manage them and the commands that will allow you to carry out the process like an expert.

What is a user in Linux and how are they classified in this open source operating system?

The expression user refers to an account with a certain amount of resources or permissions to perform a certain task or activity. that is assigned to a person, computer or application. This organization allows the functions carried out by one of them not to jeopardize the operation of the system or the work of the rest of the operators. In general terms, In Linux users belong to two groups: primary and secondary, classified into normal, special and root.

Next we see its main characteristics:

normal

They are the users who frequently use the system and has access only to modify its environment. It is recommended to use this function for daily work and leave superuser roles solely to execute more complicated commandsthat compromise weight tasks.

specials

assume some root privileges depending on the type of account, in order to safeguard the security of the system. Once the distribution is installed they are automatically created and do not have any access credentials.

See also  【+5 PlayStation and PSP emulators on iPhone】List ▷ 2022

root

It exercises the functions of administrator of user accounts and has no limitation in terms of permissions and privilegess. This feature is especially useful when you need to execute certain commands related to the file system, perform maintenance, install tools, and .

Learn step by step how to create a user in any Linux distribution like an expert

Many current distributions allow you to create users graphically, In our tutorial we are going to teach you how to do it from the Linux terminal. The procedure is not complicated and has at least two advantages: it is safe and it works for any distribution.

The steps to follow are those:

  • we entered as user root from the Linux terminal with this command: $ su.
  • For enable privileges password must be entered. When doing so you will see that the symbol “$” by “#”.
  • When the rootwe begin to create the user account with this code: # useradd username
  • I already we assign a name to this user account and now we will put a password with this command: # passwd username
  • The system asks us to enter the password twice to verify the digits. If everything has been done properly, we will already have created the new user account.

We teach you in detail how to manage users in the Linux operating system in the most efficient way possible

User administrator tasks include create the account, modify it and even delete it when it is time.

In order to perform the job properly, some commands and their respective function must be known:

Commands for user management

What is the function of commands in user administration? They allow us to analyze account details and better manage it.

Here are some of the most used:

  • Chage – Controls the date the password or user account expires.
  • Chpasswd – Change or create passwords in batch for multiple users.
  • Id: gives detailed information about the user and the groups to which he belongs.
  • Gpasswd – sets passwords for each group as well as can delete, add or list users.
  • Groupadd – Creates group accounts in the operating system.
  • Groupdel – Deletes any groups that have been created.
  • Groupmod: performs the modification of the groups.
  • Groups: indicates in which groups the user is included.
  • Newusers: Create or update users in batches.
  • Pwconv – Causes shadow protection, which enhances system passwords.
  • Pwunconv: Removes shadow protection from the distribution.
  • Useradd: Add new users to the database.
  • Userdel: Deletes users from the system.
  • Usermod: Change and add roles to users.
See also  【 SOLVED 】▷ FIX USB Port Not Working ▷ 2022

edit users

Now we focus on edit or modify a user that has already been created previouslyeither to add or to decrease functions.

The command that will take us through the route is “usermod” and to make the changes you have to perform the following steps:

  • To change the username: #> usermod –l followed by (current name) and (new name)
  • With this start name will be changed.
  • Now we modified the description of the account and its main group with this command: #> usermod -c “area supervisor” -s /bin/ksh -g 505 (username)
  • So that no one use the account when the user is on permissionwe add this command: #> usermod –L (username)

change user password

For whatever reason, at some point we will need to change the password, It could be, for example, because the assigned term expired. In this case we will use the command “passwd”which not only helps to create it but also to modify it.

The steps to do it successfully are as follows:

  • Enter the terminal and type this command: sudo passwd.
  • There he will ask that enter the new password with this message: Enter new UNIX password.
  • And then it will ask you to confirm the password: Retype new UNIX password.
  • If you have done it successfully, This message will appear on the screen: passwordwd: password updated successfully”.

On the other hand, to change the password of another user you must enter as rootusing the same command passwd.

See also  【Faraday Sheaths】What are they? + Benefits▷ 2022

The steps to follow are these:

  • After login as root, type this command: passwd user_name, at the end goes the name of the person we want to modify.
  • next, will ask us to create the new key with this command: Enter new UNIX password.
  • and then we it will tell us to verify it: Retype new UNIX password
  • So we will have everything related to the password updated.

delete users

Now, we want a user who no longer works with us to be removed from the system. We will do it using the command “userdel”which deletes the account but not the information that was uploaded.

The way to do it is like this:

  • Enter the command #> userdel followed by the person’s name.
  • If we use this code #> userdel –r (name) se delete everything, including mail, directories and files. If the user is active at that time, the function cannot be fully executed.
  • By your side, if we type #> userdel –f (name) se delete everything, regardless of whether the user is currently connected to the network.

How did you find out, all the steps They are simple and the procedures are easy to execute.. In this way, the system is kept tidy and, best of all, security is preserved.

Loading Facebook Comments ...
Loading Disqus Comments ...