Hi,

If I put my computers ip address in sudoers a command runs successfully. If I put localhost I am prompted for a password.

Check I can't run it normally:
%/root/testsudo
/root/testsudo: Permission denied.

Entry in sudoers:
chrisw  192.168.1.71=NOPASSWD:/root/testsudo

%sudo /root/testsudo
hello

Entry in sudoers:
chrisw  localhost=NOPASSWD:/root/testsudo

%sudo /root/testsudo
Password:
chrisw is not allowed to run sudo on eco.  This incident will be reported.
%ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.034 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.021 ms
^C

/var/log/messages says 'user NOT authorized on host'

The problem is this machine gets its ip address by dhcp so I shouldn't enter an ip in sudoers. Is there a neat way round this?

Thanks

Chris
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to