From owner-freebsd-stable@FreeBSD.ORG Tue Jul 14 13:03:02 2009 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27CA41065678 for ; Tue, 14 Jul 2009 13:03:02 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.freebsd.org (Postfix) with ESMTP id AFB8C8FC1F for ; Tue, 14 Jul 2009 13:03:01 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw1.york.ac.uk (8.13.6/8.13.6) with ESMTP id n6ECVjUS008389; Tue, 14 Jul 2009 13:31:45 +0100 (BST) Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1MQhAf-0005lG-6q; Tue, 14 Jul 2009 13:31:45 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.3/8.14.3) with ESMTP id n6ECViaC092669; Tue, 14 Jul 2009 13:31:44 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.3/8.14.3/Submit) id n6ECVhTb092667; Tue, 14 Jul 2009 13:31:43 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Adam McDougall In-Reply-To: <4A5B7257.1010202@egr.msu.edu> References: <20090713165717.GN2145@acme.spoerlein.net> <1de79840907131028n5b8f21deyd968639732c651a4@mail.gmail.com> <4A5B7257.1010202@egr.msu.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: Tue, 14 Jul 2009 13:31:43 +0100 Message-Id: <1247574703.82683.17.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: Michael Proto , Vlad Galu , freebsd-stable@FreeBSD.org Subject: Re: pw groupadd/useradd fail when the nscd cache is used for name/group resolution X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 13:03:02 -0000 On Mon, 2009-07-13 at 13:43 -0400, Adam McDougall wrote: > Michael Proto wrote: > > On Mon, Jul 13, 2009 at 12:57 PM, Ulrich Sp=F6rlein = wrote: > > =20 > >> On Thu, 09.07.2009 at 16:13:25 +0300, Vlad Galu wrote: > >> =20 > >>> I've stumbled upon this while installing postgres. In > >>> /etc/nsswitch.conf I had "group: cache files compat" and "passwd: > >>> cache files compat". Once I commented them out things started working > >>> again. Before the change, this is how it looked like: > >>> > >>> -- cut here -- > >>> [root@vgalu /usr/ports/databases/postgresql84-server]# pw group add p= gsql -g 70 > >>> pw: group disappeared during update > >>> [root@vgalu /usr/ports/databases/postgresql84-server]# pw group add p= gsql -g 70 > >>> pw: group 'pgsql' already exists > >>> [root@vgalu /usr/ports/databases/postgresql84-server]# > >>> -- and here -- > >>> > >>> Shouldn't 'files' be used upon a cache miss? If this is a PEBKAC, > >>> sorry for the noise. > >>> =20 > >> Just a me too. This is most likely because nscd is also caching negati= ve > >> lookups. The usual workaround would be to restart it using > >> /etc/rc.d/nscd restart > >> > >> =20 > > A slightly lower-impact alternative would be to use "nscd -i passwd" > > to invalidate the password cache. > > > > > I was intending to report this soon as well (its been on my list for a=20 > while) as a problematic > issue while installing ports. The other issue I had was Java would=20 > crash immediately if I had > nscd running (configured to cache YP). I plan to report that soon if it=20 > still happens with 1.6. > I probably tested with 1.4 or 1.5.=20 This is a known problem with nscd(8), see ports/125330 and bin/119695. If you have any further information (or even a patch) it's probably best to append it to the second of those PRs. Thanks, Gavin