Gandi Docs

 |   AAA  |    fr   en  

You are on a question's page

Using Linux
answered

Answer "apt-get does not work", by Eric B.

I found the answer to my own question, after two, err actually three days of wanderings. The symptom

sudo apt-get -s install nano

displays nothing did not mean that apt-get was broken, but that sudo was broken.

Strangely enough, there are two reasons for that: the admin group is not part of sudoers anymore (cause one line is missing at the end of /etc/sudoers) and I am not in the admin group anymore (which can be seen in /etc/group.

If you believe http://www.psychocats.net/ubuntu/fixsudo: "The /etc/sudoers file should look the same for every Ubuntu user who hasn't fiddled with it" but mine does not look like this, and I certainly did not fiddle with it, whatever that means.

So if you continue reading the post in the above link, you see the solution to repare sudo: switch to root using su (that works with the same password), then add yourself to the admin group

adduser yourname admin

then edit the sudoers file (for some reason you have to use the visudo app for that)

visudo

then put back the following lines at the end of the file:

# Members of the admin group may gain root privileges

%admin ALL=(ALL) ALL

Last modified: 28 May 2008 at 00:18 by Eric B.