how to disable dns lookups and sendmail in sudo?

This is a discussion on how to disable dns lookups and sendmail in sudo? within the Linux Administration forums, part of the Linux Forums category; I wrote a TCP server that needs to call an external program with root access, so it does that with ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-26-2004
perl coder
 
Posts: n/a
Default how to disable dns lookups and sendmail in sudo?

I wrote a TCP server that needs to call an external program with root
access, so it does that with sudo.

Only one problem: sudo always does a DNS lookup on the remote host, and
some hosts don't have a valid entry, and so it returns an error like this:

failed with exit code 255 : /usr/bin/sudo: unable to lookup testbox via
gethostbyname() sendmail: Cannot open localhost:25

Also in the syslog, it prints:

Jul 26 11:06:37 testbox tcpsrv[1727]: 2004/07/26-11:06:37 CONNECT TCP
Peer: "192.168.1.3:56549" Local: "192.168.1.104:3333"
Jul 26 11:06:37 testbox sSMTP[1729]: Unable to connect to localhost:25
Jul 26 11:06:37 testbox sSMTP[1729]: Cannot open localhost:25

Also, I want to disable all email attempts by sudo (which I imagine will
just go away if DNS lookups can be disabled). Here's my current
/etc/sudoers files:

# Host alias specification

# User alias specification

# Cmnd alias specification

# Override builtin defaults
Defaults !fqdn, !lecture, !mail_no_user

# User privilege specification
root ALL = (ALL) ALL
%users ALL = NOPASSWD: /usr/local/bin/tcpadmin


--
No crazy stuff in my email. ;-)
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:30 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0