Author Topic: you are not a sudoer!  (Read 5169 times)

0 Members and 1 Guest are viewing this topic.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
you are not a sudoer!
« 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

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: you are not a sudoer!
« Reply #1 on: June 24, 2011, 12:53:01 pm »
Heh. Reminds me of [xkcd=838]this[/xkcd].

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: you are not a sudoer!
« Reply #2 on: June 24, 2011, 12:53:18 pm »
it reports it to nobody!!! :D

What a useless feature!

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: you are not a sudoer!
« Reply #3 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.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: you are not a sudoer!
« Reply #4 on: June 24, 2011, 01:08:30 pm »
Heh. Reminds me of [xkcd=838]this[/xkcd].

That xkcd is genial :)

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: you are not a sudoer!
« Reply #5 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.