Date: Sun, 20 Jan 2008 17:47:48 +0000 From: Chris Whitehouse <cwhiteh@onetel.com> Cc: freebsd-questions@freebsd.org Subject: Re: localhost in sudoers Message-ID: <47938944.7000501@onetel.com> In-Reply-To: <4792CAE2.7070805@infracaninophile.co.uk> References: <47924869.2000909@onetel.com> <877ii5fsh0.fsf@chateau.d.lf> <47928A73.2040904@onetel.com> <4792CAE2.7070805@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Seaman wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Chris Whitehouse wrote: > >> I'm not sure what you mean. This computer is on a local network behind a >> nat box and doesn't have a dns entry. >> >> %host 192.168.1.71 >> 71.1.168.192.in-addr.arpa domain name pointer eco.config. >> %host localhost >> localhost has address 127.0.0.1 >> >> I think my question really is why doesn't sudoers recognise localhost or >> 127.0.0.1? > > Confusion between the IPv6ish ::1 rather than the IPv4ish 127.0.0.1 > perhaps? You can just put the hostname of your machine in the sudoers > file and sudo will query the IP addresses of its interfaces at runtime This pointed me in the right direction. I had put my hostname against 127.0.0.1 in /etc/hosts while messing around with trying to get it to work and forgot to take it out again - so when I put the hostname in sudoers it didn't work. Thanks Chris > - -- or simply don't use the host based limiting stuff at all: that syntax is > predicated on having the same sudoers file distributed over a number > of machines, which is great for a large site with dozens of servers, > but for a home user it's possibly easier to maintain an individual > sudoers file on each machine you have. > > Cheers, > > Matthew > > - -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > Kent, CT11 9PW > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.4 (FreeBSD) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFHksri8Mjk52CukIwRCPfHAJ9m98pQb76ID8leqKRhyHKrzmJnFwCfaVXA > n1hIg4OKpiursIKyu12ICE8= > =jGzw > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47938944.7000501>