How to Add User to Sudo ers in Debian 11 Bullseye

How to Add User to Sudoers in Debian 11 Bullseye. If you have experienced an error something like this
your username is not in the sudoers file. This incident will be reported.

it’s a sign that if we need to make a little tweak, don’t worry it’s super easy as long as we can still access the root password

1. The first step we have to do is make sure the sudo application is installed, if sudo isn’t installed, run this command

login root mode

$ su –

type your root password

# apt-get install sudo

2. After that run visudo on root mode

# visudo

3. Scroll down to the end and add this line:

your-username ALL=(ALL) NOPASSWD:ALL

Don’t forget to change “your-username” with the your username you want to grant access to.
Save the file (CTRL + X) and type Y then press Enter

 

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *