There are several ways to grant sudo privilege to a user in linux, two of them are the following
1. Add the user at the sudoers file
In order to grant sudo privilege to a given user in linux with sudo, follow this process
Required data
username = username that we which to grant privilege to
Sample data
username = abernal
Process
1. As root or as an administrative user execute the next command
visudo
2. Edit the file that appears after the command execution adding the next lines (abernal ....)
# User privilege specification root ALL=(ALL:ALL) ALL abernal ALL=(ALL:ALL) ALL
2. Add the "user" to the group "wheel"
In order to grant sudo privilege to a given user in linux with sudo, follow this process
Required data
username = username that we which to grant privilege to
Sample data
username = abernal
Process
1. As root or as an administrative user execute the next command
visudo
2. Uncomment the wheel configuration if necesary and save the file
## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL
3. As root or as an administrative user, add the user to the wheel group
$ usermod -aG wheel alejandro