LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 10: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, 01:25 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ 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



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 01:36 AM
Problem with SUDO : sudo: pam_authenticate: Module is unknown cristoph_ Linux - Software 2 03-02-2009 07:12 PM
Grant Configuring SUDO Root Privileges to Regular Users +Problem+ redir Fedora 2 02-26-2007 11:10 AM
Configuring SUDO for users, a.k.a. sudoers Micro420 Linux - Newbie 10 04-21-2006 11:12 PM
Configuring Sudo Umashankar Linux - Security 1 10-03-2004 08:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 PM.

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
Open Source Consulting | Domain Registration