LinuxQuestions.org
Visit Jeremy's Blog.
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 06-06-2011, 11:25 AM   #1
lazerking9
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu
Posts: 24

Rep: Reputation: 12
Question help configuring sudo


According to the ubuntu man pages..
Quote:
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).
My question is, is this mail sent internally by the machine, or is it handled over-the-internet like traditional email? And if it is internally, what program/script/command/etc is being used? Where do I find these messages?
 
Old 06-06-2011, 02:25 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Quote:
My question is, is this mail sent internally by the machine, or is it handled over-the-internet like traditional email? And if it is internally, what program/script/command/etc is being used? Where do I find these messages?
1. Yes mail is sent internally by the machine.
2. It uses postfix to send email, by default email is sent to root user (if no other user is set to receive that email) to report unauthorized attempt to use sudo

Conditions:

1. If postfix is not installed then it will not send email because there is no email system.
2. If you have not got mailutils install on Ubuntu you will not be able to read email. I mean that is the easiest way I am aware of reading email. Also you can try looking under /var/mail/root to see the email.

How to configure it:

1. Install postfix on Ubuntu machine using: sudo apt-get install postfix. At the time of configuration it will ask you to select whether the email system will be configure for external use or local only. Select local only.
2. Install mailutils on Ubuntu machine using: sudo apt-get install mailutils.

Testing:

1. Login with a user account who is not in sudoers file.
2. Try to use sudo: sudo mkdir /test . It will show a message saying that this incident will be reported
3. su root from the same terminal and type: mail
4. It will show you an email and then you can hit enter to read that email.

I hope this helps.
 
1 members found this post helpful.
  


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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 02:36 AM
Problem with SUDO : sudo: pam_authenticate: Module is unknown cristoph_ Linux - Software 2 03-02-2009 08:12 PM
Grant Configuring SUDO Root Privileges to Regular Users +Problem+ redir Fedora 2 02-26-2007 12:10 PM
Configuring SUDO for users, a.k.a. sudoers Micro420 Linux - Newbie 10 04-22-2006 12:12 AM
Configuring Sudo Umashankar Linux - Security 1 10-03-2004 09:54 PM


All times are GMT -5. The time now is 01:06 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