LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-21-2016, 10:11 AM   #1
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 3,079

Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
sudo maybe a trivial question, but a question nonetheless


I just updated again and sudo was updated. It installed the copy of the new sudoers file, so I looked at it. seen nothing I needed that was changed within it, but nonetheless, I said why not then backed up my old sudoers file. Copied over the old with the new, lost sudo rights, didn't think of it untl I tried to use sudo to edit the new file to change it to what I needed it to be then getting the Ole' you're in trouble message one gets when they are not listed in the sudoers file.

Code:
userx@voided & ~ >> $sudo nano  /etc/sudoers
Password: 
userx is not in the sudoers file.  This incident will be reported.
seeings how I am the only one using this system, I wondered, do I now have to yell at myself for this, put myself on probation, what reprimand do I now have to inflict myself with?

two: where is this actually logged to so the "system Admin" will see that someone that is not in the sudoers file has actually tried to use the sudo command.

so in a real world situation of someone else being an Admin person would know that this has taken place so he can actually go yell at that person for doing so?

does it pop up whenever this admin person logs in or does he or she actually have to go and open up said file/log to see if any attempts have been made?
 
Old 09-21-2016, 10:16 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,356

Rep: Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989
It's stored in a log file, on CentOS 7 it's /var/log/secure:
Code:
$ sudo ls

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for eggroll: 
eggroll is not in the sudoers file.  This incident will be reported.
Code:
# tail /var/log/secure
Sep 21 08:12:47 gauss sudo: eggroll : user NOT in sudoers ; TTY=pts/18 ; PWD=/home/eggroll ; USER=root ; COMMAND=/bin/ls
Of course the admin could always set up a daemon to monitor the log file and notify them if there are any unauthorized sudo attempts.

Last edited by suicidaleggroll; 09-21-2016 at 10:39 AM. Reason: typo
 
Old 09-21-2016, 10:38 AM   #3
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 3,079

Original Poster
Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
Quote:
Originally Posted by suicidaleggroll View Post
It's stored in a log file, on CentOS 7 it's /var/log/secure:
Code:
$ sudo ls

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for eggroll: 
eggroll is not in the sudoers file.  This incident will be reported.
Code:
# tail /var/log/messages
Sep 21 08:12:47 gauss sudo: eggroll : user NOT in sudoers ; TTY=pts/18 ; PWD=/home/eggroll ; USER=root ; COMMAND=/bin/ls
Of course the admin could always set up a daemon to monitor the log file and notify them if there are any unauthorized sudo attempts.

sweet, thanks let me go take a peek at my log system area to C what I C.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
just a liltle simple trivial question thtr2k General 2 02-27-2007 07:03 AM
A trivial question about editors WilliamS Slackware 4 01-24-2007 08:25 AM
Trivial bash question - executing $COMMAND atom Programming 4 06-05-2005 05:17 AM
A bit off linux subject, but a question nonetheless klintonray Linux - Software 8 07-27-2003 11:52 PM
Trivial sound question kkempter Linux - General 3 03-03-2003 11:53 AM


All times are GMT -5. The time now is 04:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration