How to add a Sudo User in Arch Linux
You might be installing Arch and having a root account right now, and you want to add a sudo user.
Lets add my username to your machine so I could use it too.
First, we need to make a new user then we will give the user sudo privileges
Now reboot and then login using fellchase & try to use sudo, It should work
Lets add my username to your machine so I could use it too.
First, we need to make a new user then we will give the user sudo privileges
useradd -m -G users -s /bin/bash fellchaseNow we've to set up password for new user
passwd fellchaseBe CAREFUL now, ideally you should use visudo to edit this but I'm a nano user so I can use it too.
nano /etc/sudoersMake sure you don't mess up this file by adding unnecessary tabs and spaces!!! Just type this line
fellchase ALL=(ALL) ALLBelow this line
root ALL=(ALL) ALLNow use CTRL + X to exit hit 'y' to confirm and then hit ENTER
Now reboot and then login using fellchase & try to use sudo, It should work
Thanks, this was really useful!
ReplyDeleteYou don't need to reboot, you can just log out and log back in. Should work.
ReplyDelete