![]() ![]() Please do share your feedback and comments in below comments section. 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. To get to an interactive shell with root prompt: doas -s. For example, to use pacman : doas pacman -Syu. To use doas, simply prefix a command and its arguments with doas and a space: doas cmd. The sudoers file defines access rights and can be edited to grant or deny certain privileges to regular users. To begin using doas as a non-privileged user, it must be properly configured. 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. Arch Linux How to Create User - Fast - Easy sudo useradd -m steve -p s sudo useradd -d /home/notsteve -m steve -p s sudo useradd -G group1 -d /home/notsteve. # 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. Please see Known issues.Right off the bat, we need to install the sudo utility. Now to allow to use sudo, you can just do usermod -a -G sudo.That line will allow any users in the sudo group to use sudo. You can customize the above line to change the permissions just as though sudo was a user. Setup after install If you are a WSL1 user, you must change the glibc package. To be able to do that, you should make sure you have the following line in your sudoers file: sudo ALL (ALL:ALL) ALL. This zip file is doesnât include rootfs (~200 MB), hence its zip file is very small (~2 MB), but rootfs is donwloaded in the first run.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |