From owner-freebsd-questions@FreeBSD.ORG Sun Jan 20 17:47:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FBD416A417 for ; Sun, 20 Jan 2008 17:47:50 +0000 (UTC) (envelope-from cwhiteh@onetel.com) Received: from smtp1.bethere.co.uk (smtp1.betherenow.co.uk [87.194.0.68]) by mx1.freebsd.org (Postfix) with ESMTP id 3F46413C4D1 for ; Sun, 20 Jan 2008 17:47:50 +0000 (UTC) (envelope-from cwhiteh@onetel.com) Received: from [192.168.1.71] (87-194-3-32.bethere.co.uk [87.194.3.32]) by smtp1.bethere.co.uk (Postfix) with SMTP id 897AA9807D for ; Sun, 20 Jan 2008 17:47:48 +0000 (GMT) Message-ID: <47938944.7000501@onetel.com> Date: Sun, 20 Jan 2008 17:47:48 +0000 From: Chris Whitehouse User-Agent: Thunderbird 2.0.0.9 (X11/20071228) MIME-Version: 1.0 CC: freebsd-questions@freebsd.org References: <47924869.2000909@onetel.com> <877ii5fsh0.fsf@chateau.d.lf> <47928A73.2040904@onetel.com> <4792CAE2.7070805@infracaninophile.co.uk> In-Reply-To: <4792CAE2.7070805@infracaninophile.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: localhost in sudoers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2008 17:47:50 -0000 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" >