You are not logged in.

#1 2011-04-28 20:25:23

avdmeers
Member
Registered: 2011-04-24
Posts: 11

Sudo and wheel no longer works

I basically have no idea what caused it, but all of the sudden I can no longer use the sudo command on my account (not root). The error given is:

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

The actions taken before this issue were adding a new group svn, and adding my user to it with

usermod -G svn USER_NAME

In visudo I noticed the wheel group line

wheel ALL=(ALL) ALL

was commented out again, but I changed it. My user is effectively part of the wheel group. Any idea were to start looking, as it leaves me perplexed?

Last edited by avdmeers (2011-04-28 20:25:51)

Offline

#2 2011-04-28 20:47:36

Awebb
Member
Registered: 2010-05-06
Posts: 6,310

Re: Sudo and wheel no longer works

It should be %wheel and not wheel. % means group, nothing means user. You killed the % because you thought it's commented out. That is by the way why you should use visudo until you learned how the sudoers works.

Last edited by Awebb (2011-04-28 20:48:17)

Offline

#3 2011-04-28 21:00:44

avdmeers
Member
Registered: 2011-04-24
Posts: 11

Re: Sudo and wheel no longer works

Thanks, makes me feel foolish, I did use visudo, always do actually, but with all the background in scripting languages like Matlab, I did look at the % character as comment. I should have known better, thanks.

Offline

#4 2011-04-28 21:32:59

nosami
Member
Registered: 2010-09-16
Posts: 4

Re: Sudo and wheel no longer works

you also forgot the -a switch to usermod, without it you overwrite the groups that you are a member of, instead of appending to them

Offline

Board footer

Powered by FluxBB