is not in the sudoers file. This incident will be reported.

Asked by Melvyn

Hi,

I'm running Ubuntu 8.04. I installed Virtual Box and Windows Vista in it. I then tried to install something else, went to System - Administration only to discover, much to my horror, that Synaptic had disappeared. I did sudo Synaptic and got this message: "melvyn is not in the sudoers file. This incident will be reported."

I've seen conflicting answers as to how to solve this problem in other websites and, as I don't want to fool around with sudo, I would rather get suggestions from this site.

Many thanks,

Melvyn

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Tony Mugan
Solved:
Last query:
Last reply:
Revision history for this message
Andre Mangan (kyphi) said :
#1

Synaptic is not lost, merely the icon that activates it.

If you go to System and open your Control Center, you will find an entry called Main Menu under Look and Feel.

Scroll down the menu entries on the left and find System and then Administration.

Place a tick into the box next to Synaptic Package Manager.

Andre

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#2

Hi André,

Thanks for your quick response. I had tried what you suggest but when I
ticked the Synaptics box the tick disappeared after a couple of seconds
and thus doesn't allow it to appear in the Administration menu.

Cheers,

Melvyn

-------- Message initial --------
De: Andre Mangan <email address hidden>
À: <email address hidden>
Sujet: Re: [Question #38236]: is not in the sudoers file. This incident
will be reported.
Date: Fri, 04 Jul 2008 21:46:50 +0000

Your question #38236 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/38236

    Status: Open => Answered

Andre Mangan proposed the following answer:
Synaptic is not lost, merely the icon that activates it.

If you go to System and open your Control Center, you will find an entry
called Main Menu under Look and Feel.

Scroll down the menu entries on the left and find System and then
Administration.

Place a tick into the box next to Synaptic Package Manager.

Andre

Revision history for this message
Thinboy00 (thinboy00) said :
#3

1. Boot in recovery mode
2. Type visudo (you're already root so you don't need to sudo here)
3. confirm that there is a line matching the following:
%admin ALL=(ALL) ALL
whitespace is irrelevant, just make sure it is its own line not preceded by a # symbol
4. If not, add that line (hit i to enter insert mode and escape to return to normal mode)
5. type :wq (in normal mode)
6. If you get an error message, comment out any other lines with # symbols. If you still get an error message, visudo is misbehaving or I mistyped that line above.
7. To be on the safe side, type (on the command line) groups melvyn (or whatever your normal username is)
8. Check if the output contains the word admins. If not, you'll have to do a quick adduser melvyn admins
9. Type shutdown -r now
10.Boot as normal
11.This will fix your sudoers issues, not the missing icon. You'll have to figure that out for yourself.

Revision history for this message
Tony Mugan (tmugan) said :
#4

It sounds to me like you've lost the ability to raise your privileges to root with the user account "melvyn"

Can you open a terminal window and post the results of

id

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#5

Good morning Tony,

Here there are. Wouldn't it be vboxusers that's causing the problem?

melvyn@melvyn-desktop:~$ id
uid=1000(melvyn) gid=1000(melvyn) groupes=127(vboxusers),1000(melvyn)
melvyn@melvyn-desktop:~$

Best,

Melvyn

-------- Message initial --------
De: Tony Mugan <email address hidden>
À: <email address hidden>
Sujet: Re: [Question #38236]: is not in the sudoers file. This incident
will be reported.
Date: Sat, 05 Jul 2008 03:09:24 +0000

Your question #38236 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/38236

Tony Mugan proposed the following answer:
It sounds to me like you've lost the ability to raise your privileges to
root with the user account "melvyn"

Can you open a terminal window and post the results of

id

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#6

Thanks. I'll try this and post result.

Cheers,

Melvyn

-------- Message initial --------
De: Thinboy00 <email address hidden>
À: <email address hidden>
Sujet: Re: [Question #38236]: is not in the sudoers file. This incident
will be reported.
Date: Sat, 05 Jul 2008 03:04:32 +0000

Your question #38236 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/38236

    Status: Open => Answered

Thinboy00 proposed the following answer:
1. Boot in recovery mode
2. Type visudo (you're already root so you don't need to sudo here)
3. confirm that there is a line matching the following:
%admin ALL=(ALL) ALL
whitespace is irrelevant, just make sure it is its own line not preceded by a # symbol
4. If not, add that line (hit i to enter insert mode and escape to return to normal mode)
5. type :wq (in normal mode)
6. If you get an error message, comment out any other lines with # symbols. If you still get an error message, visudo is misbehaving or I mistyped that line above.
7. To be on the safe side, type (on the command line) groups melvyn (or whatever your normal username is)
8. Check if the output contains the word admins. If not, you'll have to do a quick adduser melvyn admins
9. Type shutdown -r now
10.Boot as normal
11.This will fix your sudoers issues, not the missing icon. You'll have to figure that out for yourself.

Revision history for this message
Bhavani Shankar (bhavi) said :
#7

Hi

yes Try updating your sudoer file to include:
root ALL=(ALL) ALL

http://www.psychocats.net/ubuntu/fixsudo

Regards

Revision history for this message
Thinboy00 (thinboy00) said :
#8

Oh right, I completely forgot about the root line... sorry
You have to include root ALL=(ALL) ALL as Bhavani Shankar said

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#9

Hi Thinboy00, hi Bhavani,

I followed the steps indicated below. I assume that once booting in
recovery mode I was supposed to chose the "Root" option in the window.
In any case, the line "%admin ALL=(ALL) ALL" is there and it is not
preceded by a # symbol. I then added "%root ALL=(ALL) ALL". a line
appeared below with "recording".

However, I couldn't get out of this mode hitting escape. All I got was
the system beep. So finally I got out with Ctrl+Alt+Del, which I assume
cancelled what I had written before as I still have the problem when
rebooting normally.

-------- Message initial --------
De: Thinboy00 <email address hidden>
À: <email address hidden>
Sujet: Re: [Question #38236]: is not in the sudoers file. This incident
will be reported.
Date: Sat, 05 Jul 2008 03:04:32 +0000

Your question #38236 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/38236

    Status: Open => Answered

Thinboy00 proposed the following answer:
1. Boot in recovery mode
2. Type visudo (you're already root so you don't need to sudo here)
3. confirm that there is a line matching the following:
%admin ALL=(ALL) ALL
whitespace is irrelevant, just make sure it is its own line not preceded by a # symbol
4. If not, add that line (hit i to enter insert mode and escape to return to normal mode)
5. type :wq (in normal mode)
6. If you get an error message, comment out any other lines with # symbols. If you still get an error message, visudo is misbehaving or I mistyped that line above.
7. To be on the safe side, type (on the command line) groups melvyn (or whatever your normal username is)
8. Check if the output contains the word admins. If not, you'll have to do a quick adduser melvyn admins
9. Type shutdown -r now
10.Boot as normal
11.This will fix your sudoers issues, not the missing icon. You'll have to figure that out for yourself.

Revision history for this message
Tony Mugan (tmugan) said :
#10

Edit with gedit in GUI mode then reboot

sudo env EDITOR=gedit visudo

Revision history for this message
Thinboy00 (thinboy00) said :
#11

To save your changes and quit, hit escape until the computer beeps, then type :wq and hit enter
The colon is intentional and not a typo.

Revision history for this message
Thinboy00 (thinboy00) said :
#12

You can't get gedit running in recovery mode, can you?

Revision history for this message
Thinboy00 (thinboy00) said :
#13

"'%root ALL=(ALL) ALL'"
No, you want
root ALL=(ALL) ALL
(no % sign)

Revision history for this message
Thinboy00 (thinboy00) said :
#14

if you see "recording" at the bottom of the screen, you forgot the colon. hit q a second time to leave this mode.

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#15

OK. "root ALL=(ALL) ALL" is in there.

I did :wq and I get "etc./.sudoers.tmp" 24 lines, 471 characters
written".

When I type "groups melvyn" I get "melvyn vboxusers".

No error line appears.

But I still cannot get Synaptic to work. And when I try to open, say,
gparted I get (translated from French, so the wording might not
correspond to the English version):

"Impossible to launch /usr/bin/gparted as root user.
The underlying authorisation mechanism (sudo) does not authorise you to
launch this program. Contact your administrator".

Does this help?

-------- Message initial --------
De: Thinboy00 <email address hidden>
À: <email address hidden>
Sujet: Re: [Question #38236]: is not in the sudoers file. This incident
will be reported.
Date: Sat, 05 Jul 2008 16:58:20 +0000

Your question #38236 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/38236

Thinboy00 proposed the following answer:
"'%root ALL=(ALL) ALL'"
No, you want
root ALL=(ALL) ALL
(no % sign)

Revision history for this message
Tony Mugan (tmugan) said :
#16

Are there any other user accounts created? One of them probably has admin rights.
It seems like you just don't have admin group membership from the "id" command you ran earlier.

You need to give the account "melvyn" the ability to administer the system by adding it to the "admin" group.

http://www.zolved.com/synapse/view_content/28019/How_to_add_an_additional_Super_User_DOSUDO_in_Ubuntu

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#17

Hi Tony,

Well, I never created any other user accounts. I have always used the
configuration given by Ubuntu on installation. As I mentioned before the
problem started when I installed VirtualBox. My feeling is that it was
VirtualBox that somehow changed the account setting.

Thanks for the link to Zolved you provided. I made a couple of
screenshots of Users Settings. As you will see, I'm not allowed to do
anything!

Here's what I get:

-------- Message initial --------
De: Tony Mugan <email address hidden>
À: <email address hidden>
Sujet: Re: [Question #38236]: is not in the sudoers file. This incident
will be reported.
Date: Sun, 06 Jul 2008 02:09:43 +0000

Your question #38236 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/38236

    Status: Open => Answered

Tony Mugan proposed the following answer:
Are there any other user accounts created? One of them probably has admin rights.
It seems like you just don't have admin group membership from the "id" command you ran earlier.

You need to give the account "melvyn" the ability to administer the
system by adding it to the "admin" group.

http://www.zolved.com/synapse/view_content/28019/How_to_add_an_additional_Super_User_DOSUDO_in_Ubuntu

Revision history for this message
Best Tony Mugan (tmugan) said :
#18

The screenshots are not visible here.

Can you boot into recovery mode and try this

sudo adduser melvyn admin

This should add your account to the admin group.
Then reboot normally and login as melvyn.

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#19

That solved. I lost some of my previous configurations (e.g advance
desktop effects settings) but that's no problem. Many thanks to Tony,
Thinboy, Bhavani and André.

Melvyn

-------- Message initial --------
De: Tony Mugan <email address hidden>
À: <email address hidden>
Sujet: Re: [Question #38236]: is not in the sudoers file. This incident
will be reported.
Date: Sun, 06 Jul 2008 08:44:34 +0000

Your question #38236 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/38236

    Status: Open => Answered

Tony Mugan proposed the following answer:
The screenshots are not visible here.

Can you boot into recovery mode and try this

sudo adduser melvyn admin

This should add your account to the admin group.
Then reboot normally and login as melvyn.

Revision history for this message
Melvyn (melvyn-gattinoni) said :
#20

Many thanks to Tony, Thinboy, Bhavani and André.

Revision history for this message
J_Wesker (wesker-report2) said :
#21

Thanks! I had the same issue after installing subversion and subversion-tools on my Ubuntu 9.04 - Jaunty Jackalope 32 bits.

I fixed it thanks to the comment from Tony Mugen !