Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently moved to Slackware 12 and noticed that the sudo logs are send to the mailbox of root, for example if a user tries to use SUDO and is not defined in the SUDOERS file, an incident report is send to root. I would like to change that the this kind of mails goes to my user account just to avoid using root as least as possible. I have tried to put the something like DEFAULT MAILTO = "me@host" but I keep getting syntax error. Does anyone know how set it correctly?
I suppose it's possible you have a somewhat different sudo implementation/version (?), but on my CentOS 4 box, man 5 sudoers shows:
Quote:
mailto
Address to send warning and error mail to. The address
should be enclosed in double quotes (") to protect against
sudo interpreting the @ sign. Defaults to root.
I haven't tested this, but I'd interpret that to mean: mailto = "some@email.address"
Good idea editing with visudo, by the way. A syntax error at save/parse time is a lot better than a broken sudo.
Defaults mailto = "julix@jtlx" and it passed the syntax on the sudoers file,I had to put the d in upper case. STUPID ME!!!! But when I test with another user account who is not on the sudoers file to execute as SUDO, the system does not send the mail with the incident report to my account julix nor to the root. I have looked in the man page and add the parameter mail_no_user. The line would be look like this Defaults mail_no_user mailto = "julix@jtlx but then I get the syntax error again .
Anomie, my apologies if I am wrong but I think you are saying to try something like example Default mailto ="user@myisp.com", well what I want is that the reports donīt go to some email address but to my account mail within my linuxbox.
Regards,
Julix
Last edited by Julix; 09-03-2007 at 10:08 AM.
Reason: forgot to add one more thing
I have tried the Defaults mailto= "julix" entry, it passes the syntax verification but it wonīt send the notification to my account. Maye I have to add some additional parameters
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.