Step 2: Add User to Group. To add a user to the wheel group, use the command: usermod –aG wheel UserName. As usual, replace UserName with the name of the user receiving sudo privileges. Step: 3 Switch to the Sudo User. Switch to the new (or newly-elevated) user account with the su (substitute user) command: su - UserName. Enter the password ...
Slight changes to a password are also helpful when creating unique passphrases for several accounts. Rather than creating a new password from scratch, you can add a different code to your existing password for each online account (e.g. {Andrew,77}EBAY for your eBay profile and {Andrew,77}PPAL for the PayPal account).
sudo usermod -aG sudo <username>
The is very important. Without it they'll be removed from all other groups. You will need to either restart your shell/terminal or log out and back in for this to take effect. a
See also:
Login as root or to get root prompt su
type visudo
an editor will open find a line says
root ALL=(ALL) ALL
add one with your username below that
user ALL=(ALL) ALL
Type Type ctrl+x to the prompt Y
Once you have become root via , do:su
adduser orangepi sudo
If you don't have on your system, try with adduser to append to the groups list:usermod -a
usermod -a -G sudo orangepi
You might also want to investigate which groups your user is a member of by default, and add those back as well (such as the group named after your user, , etc.).adm
Alternatively, you can use :su -c
su -c "adduser orangepi sudo"