DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Most likely, the line you added to the sudoers file does not do what you want it to do. And I doubt that gedit visudo is the right command for changing the sudoers file.
Last edited by berndbausch; 03-03-2019 at 04:39 PM.
You really need to check the man pages for sudo. NOTHING should ever edit the sudoers file other than visudo, and that should only work for root.
Make sure that you read the man pages about the sudoers file format. Visudo should check the format and warn you if you have wrong syntax, but it cannot detect incorrect logic.
Installation of sudo does not automatically configure sudo, so after installation it will only work for root (which really does not need it, but allows you to configure the users and commands you need.
Finally, there is a log file for sudo and debian has it (by default, I believe) log to /var/auth. Whenever you bring a problem here it is wise to check the log files first and include any log data that pertains.
I found a guide on the web that helped me https://www.vultr.com/docs/how-to-us...os-and-freebsd After creating a new user account, sudo started working. I deleted the user account and rebooted my computer and it still works.
What do you mean you installed sudo? What distribution are you using? Are you sure it was not already installed?
Assuming that your 'installation' did not cause any problems, you do not need to edit the sudoers file. In fact gedit or any other editor should never be used to modify the sudoers file. In fact the beginning of the file states
Quote:
# This file MUST be edited with the 'visudo' command as root.
and that is exactly what must be done. But you do not need to do that I strongly suspect.
You probably are not a member of the sudo group. Check that with
Code:
grep <your username> /etc/group
If there is not a sudo line in the return, you are not a member of the group. Become a member of the group with AS ROOT
Code:
passwd <your username> sudo
Now you are a member of the sudo group and can use sudo. You may have to log out and then log back in for it to take effect.
What do you mean you installed sudo? What distribution are you using? Are you sure it was not already installed?
The OP installed Debian and supplied a root password during installation (I reckon anyway). In this case, sudo is not installed during the installation process.
I see. I did not know Debian did not install sudo, I thought it did. The rest of my post should still be valid, though, assuming his installation had no problems and his attempt to edit sudoers did not was unsuccessful. As some above suggested he really should remove his edits if they are there.
I'll also note that there were responses posted while I was composing mine and checking to make sure I was giving valid information, so I did not see his response that is just above mine.
I see. I did not know Debian did not install sudo, I thought it did. The rest of my post should still be valid, though, assuming his installation had no problems and his attempt to edit sudoers did not was unsuccessful. As some above suggested he really should remove his edits if they are there.
From Squeeze onwards, it does install and configure sudo if you leave the root password blank on installation.
I am not knowledgeable about Debian but I assume that the idea is that if you enter a root password then you don't want to use the common modern distro paradigm of running your distro as an ordinary user and sudoing when you need admin privileges or, perhaps more likely, you will be setting up your users and their rights manually in your own time.
Or something like that. I only know about this behaviour because I was caught out myself setting up a Debian install a couple of years ago.
Sudo is not something you install. It's something you configure.
Debian expects you to use su to assume root privileges. See man su and man sudo for more.
Codswallop, if I may so. From the Debian wiki I linked to earlier (my emphasis):
Quote:
As of DebianSqueeze, if you give root an empty password during installation, sudo will be installed and the first user will be able to use it to gain root access (currently, the user will be added to the sudo group). The system will also configure gksu and aptitude to use sudo. You should still verify group membership after logging in as the installed user.
Straight from the horse's mouth, as they say.
This is not, and shouldn't be, an argument about the use of sudo. This should be about helping the OP and explaining the situation, not expounding our personal opinions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.