Arch Linux resources website https://wiki.archlinux.org/index.php/Users_and_groups
Enable sudoers Notes
Settings
Open settings.
visudo
Uncomment the wheel group, this allows all users in the wheel group to run all commands.
%wheel ALL=(ALL) ALL
Add user
Add user to the wheel group, change userName to the user name you require.
useradd -m -G wheel -s /bin/bash userName
Protect the user account with a password
passwd userName
Adding a system user
useradd -r -s /usr/bin/nologin userName
Changing user login names
usermod -l userNewName userOldName
Changing user’s home dir
usermod -d /new/home/dir -m userName
Test if sudo works by entering the command
sudo whoami
If you get something like this (below), then sudo is working for the set account.
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.