Omnimaga

General Discussion => Technology and Development => Computer Usage and Setup Help => Topic started by: jnesselr on June 24, 2011, 12:50:23 pm

Title: you are not a sudoer!
Post by: jnesselr on June 24, 2011, 12:50:23 pm
If you have ever used linux, you most likely have run into the problem of a user account not being in the sudoers file.  The strange thing is that it says that it hsa been reported.  Scary, right?  But when it's on your own server, who on earth is it reported to?  I thought it was just some warning or whatever having the same effect as a "keep out" sign.  Well, guess what.  I was wrong.

I was attempting to set up a mail server to be able to automate a few things simply by emailing the server.  For example, downloading a video where the site that hosts the video is blocked.  I created an account called fmaster in order to try the mail server.  Well, I messed up in the creation of the account, and apparently didn't give the account sudo privileges.  No big deal, right, I just switch back over to the main account that has sudo privileges and that's that.  Of course, the only reason that I knew fmaster didn't have sudo powers was because it complained and told me I wasn't a sudoer, and it was being reported.  Okay, whatever, no big deal, right?

So I check where the mailbox is and notice it is at /var/mail/fmaster.  So I just cd over into /var/mail/ and see two different files.  fmaster and nobody. I was surprised because nobody had an account called "nobody".  So I used "sudo cat nobody" to list the contents of the file.  I found that it was a message sent automatically from the root account saying that fmaster didn't have sudo access, the command it was trying to run, and other useful tidbits of information.

So now you know, boys and girls.  When you aren't a sudoer, and it says you have been reported, it reports it to nobody!!! :D
Title: Re: you are not a sudoer!
Post by: Juju on June 24, 2011, 12:53:01 pm
Heh. Reminds me of [xkcd=838]this[/xkcd].
Title: Re: you are not a sudoer!
Post by: Spyro543 on June 24, 2011, 12:53:18 pm
it reports it to nobody!!! :D

What a useless feature!
Title: Re: you are not a sudoer!
Post by: Jim Bauwens on June 24, 2011, 01:07:09 pm
Hum, its not useless. I'm sure you can set it up somewhere, and normally it should report it to Root, so I don't know what happened there.
Title: Re: you are not a sudoer!
Post by: Munchor on June 24, 2011, 01:08:30 pm
Heh. Reminds me of [xkcd=838]this[/xkcd].

That xkcd is genial :)
Title: Re: you are not a sudoer!
Post by: Jim Bauwens on June 24, 2011, 01:10:43 pm
Here is a part from the sudo man page:

Quote from: man sudo
If a user who is not listed in the sudoers file tries to run a command
via sudo, mail is sent to the proper authorities, as defined at
configure time or in the sudoers file (defaults to root).  Note that
the mail will not be sent if an unauthorized user tries to run sudo
with the -l or -v option.  This allows users to determine for
themselves whether or not they are allowed to use sudo.