Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-19-2005, 10:51 AM
|
#1
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492
Rep:
|
sudo logging
Hello,
I am setting up sudo on a server. It's working very smoothly so far. I'm still in the testing phase. When try to 'sudo' a command that the user is not authorised to run, the warning goes to a log file. However, it also echos to the root user's tty, which is really really not what i want to happen.
Here is my /etc/sudoers file:
Code:
Defaults logfile=/var/run/sudo/sudo.log, mailto="admin@domain.com"
Cmnd_Alias ADDUSER=/ops/adduser
# User privilege specification
root ALL=(ALL) ALL
# Members of the admin group may gain root privileges
%sdesk ALL=NOPASSWD:/sbin/passwd,ADDUSER
Can anyone give me any hints?
Many thanks.
Tom
|
|
|
10-20-2005, 11:04 PM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,417
|
However, it also echos to the root user's tty, which is really really not what i want to happen.
dmesg -n[number]?
|
|
|
10-21-2005, 02:51 AM
|
#3
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492
Original Poster
Rep:
|
thanks for you tip.
however, the problem is that a failure event is treated as an 'event'. if you see below this kind of event gets echoed to root's terminal because of how i have /etc/syslog.conf set up.
from http://www.courtesan.com/sudo/man/sudoers.html#defaults
syslog_badpri
Syslog priority to use when user authenticates unsuccessfully. Defaults to alert.
# @(#)B.11.11_LR
#
# syslogd configuration file.
#
# See syslogd(1M) for information about the format of this file.
#
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *
|
|
|
10-21-2005, 04:37 AM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,417
|
if you see below this kind of event gets echoed to root's terminal because of how i have /etc/syslog.conf set up.
Yeah, that would have been my second guess.
It's all going to file, which should mean you're using some reporting tool to filter the logs and send alerts to people, so why not disable the console line? No one should be on the root console all the time anyway.
|
|
|
10-21-2005, 05:56 AM
|
#5
|
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,492
Original Poster
Rep:
|
yeah, it was my own over exurberance.
Well, it's hp-ux - i've got no real alternative to logging in as root using telnet (!). The app we run can't even use shadow passwords! haha.
Anyway, i think i acutally want to know if someone manages to do a wrong sudo, as no one actually has access to the terminal.
we don't use a reporting tool as such. Thanks for your input.
FYI this is run from a menu within a FAT client. the service desk will be creating using accounts..... lol... melt down time.......
|
|
|
All times are GMT -5. The time now is 01:35 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|