![]() That’s conclude the article, we hope that this guide has provided enough insights in the creation of a sudo user in Arch Linux. You will be provided with a disclaimer informing you of the salient things to keep in mind when invoking sudo and later, you will be prompted for the password. ![]() In the example below, we are updating Arch Linux. Now try invoking sudo along with a command that is usually reserved for the root user. Provide the user’s password and hit ENTER. Lastly, we are going to confirm if the user can perform root tasks. ![]() Save and exit the sudoers file Step 3) Testing the sudo user Under the User privilege specification section, add the following line. When prompted, provide the new user’s password and confirm it.Īlternate way to configure regular user as sudo user, add following user’s entry in the sudoers file as shown below, # vim /etc/sudoers %wheel ALL=(ALL) ALLĪs we have already a regular user, let’s assign password as shown using the passwd command. Uncomment it and save the file to enable the wheel group. In the basic arch linux installation it would be commented. Once you have opened the sudoers file, scroll and locate the following entry. The sudoers file defines access rights and can be edited to grant or deny certain privileges to regular users. This ushers you to the sudoers file which is rendered on a vim editor. To confirm that the wheel group is enabled, execute the command: # visudo The wheel group is a special type of group in Linux systems that controls who has access to sudo commands. We need to edit the sudoers file located at /etc/sudoers The user does not yet have the capability of running elevated commands. What we have so far done is to create a regular login user. To accomplish this, run the command as follows: # useradd -m -G wheel -s /bin/bash techuser Step 3) Configure the regular user as sudo user So, let’s assume you want to add a regular user called techuser. In this case, we are assigning bash shell denoted by /bin/bash. The -s option specifies the default login shell. In this case, the user is being added to the wheel group. The -G option adds the user to an additional group. The -m option creates a home directory for the user /home/user. # useradd -m -G wheel -s /bin/bash username To create a sudo user, use the useradd command as shown: We will later add this user to the sudoers group to enable them to carry out administrative tasks. To install this, execute the following command as root: # pacman -S sudo Step 2) Create a regular user Unlike other Linux distributions, this is not included by default in the base install. Right off the bat, we need to install the sudo utility.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |