Syntax error in sudoers file
Hi Everybody,
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? Thanks and regards, Julix |
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 = "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. ;) ------------ edit ---------------------------------------- Ok, I was wrong. But this passes the syntax check: Defaults mailto = "some@email.address" I haven't tested the actual functionality. Hopefully that'll be the one. |
Have you tried without the word default? What exactly does your line
look like? Cheers, Tink |
Thanks all for your replies,
My user account is julix, and the hostname is jtlx actually the line look exactly like this: default mailto = "julix@jtlx" i have tried it without "default" : mailto = "julix@jtlx" ,but I still get the syntax error message Regards, Julix |
Neither of those passes my syntax checker. Try the second suggestion I mentioned above.
|
I have entered the line
Defaults mailto = "julix@jtlx" and it passed the syntax on the sudoers file,I had to put the d in upper case. STUPID ME!!!!:D 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 |
One more comment from me, and if it doesn't work I may have to do some real testing. :eek:
Have you tried simply: Defaults mailto = "julix" ?? |
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
|
Found the problem!!!
When I setup Slackware in my box, I didnīt enable the sendmail daemon. I have enabled it now and the issue has been solved.
Regards |
Oh dear :}
Well, glad you found the solution in the end ;} Cheers, Tink |
All times are GMT -5. The time now is 11:59 PM. |