Add User To Sudoers. Now that the new user has been created let s go ahead and add the user to the sudo group using the usermod command. When users are added to the sudo group they acquire the ability to invoke sudo when running system related tasks.
Usermod ag sudo username. Adding users to sudoers file manually. Granting sudo access using this method is sufficient for most use cases.
Usermod ag sudo username.
Add user to group. All you do is open the etc sudoers file and add the username to the list. Test sudo privileges for the user account. Open the sudoers file in an editor.