[SOLVED] andrzejl is not in the sudoers file in Debian.

Hello beautiful peoples!


Recently for shits and giggles I’ve decided to install Debian 13 Testing Linux to a SSD connected via USB using USB to SATA cable. Since then I’ve been booting to the installation once a day and trying to configure and or fix one thing. My goal is to have a working installation that is configured to suit my needs “soon”. Will I be using it as my daily driver? Hell naw… Its going to be my emergency OS in case excrement hits the oscillator.

In Debian, using sudo is optional. Historically, Unix-like systems functioned without it, and some users prefer directly opening a root session with su -, which eliminates security concerns related to potential vulnerabilities in the sudo package.

However, sudo offers several advantages:

– It avoids the need to share the root password, enhancing security.

– Temporary administrative privileges can be assigned without requiring a password change.

– It ensures that only necessary commands run with elevated permissions, reducing the risk of unintended system damage.

– It provides logging and auditing, recording executed commands for security and accountability.

Debian’s default setup allows users in the sudo group to execute commands with administrative privileges without modifying the sudoers file.

To use sudo in Debian You need to “enable it” by adding Your user to the sudo group. If You didn’t do that You can expect to see a message like this:

andrzejl@OptiPlex-7010:~$ sudo apt remove firefox-esr
[sudo] password for andrzejl:  
andrzejl is not in the sudoers file.
andrzejl@OptiPlex-7010:~$


If you prefer to use sudo, simply run these three commands to enable it:

su -
usermod -aG sudo username

Replace username with the actual user login to grant them sudo privileges.

reboot


When your system is booted up again You should have sudo privileges.


Et voila…

I hope this helps!

Catch you on the flip side,

AndrzejL

Avatar photo

AndrzejL

“Some men just want to watch the world burn.”

Leave a Reply

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