From owner-freebsd-questions@FreeBSD.ORG Sun Oct 21 12:46:01 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D323B73B; Sun, 21 Oct 2012 12:46:01 +0000 (UTC) (envelope-from afiskon@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 737D28FC18; Sun, 21 Oct 2012 12:46:01 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so2552180vbm.13 for ; Sun, 21 Oct 2012 05:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uL2+mFfwMFC9ihkhCnI3VntnsY4rvjR5fGPFKeIcje8=; b=E9WtLCoativm5US3nXb3V3/pbP/oJafOV5xEkihLkRFLSsO8JwEHxowE3dPox6HpYW GbmVqaHnf8EeJL8hYrVgklcItp6tj6Cd7wX3jukjdvctSXaU+LYvABXfE/BZ5RqKfMop 2O6UCvL7MGGBSpwtmGhBzWdzLk3ZPm0DUTGAbZVvAoYmlvaJvKOjRP8SGi5Owqr3ypGO RpdhEIi4vR4VlhuvUfsxH5HWHdSzKs+YkcQhNQ+i5btlS1wmDBVxwjD1DyH4c7qH9h/q AiqKRsUDVXDpcqIRBQXGJ3ztm67CcyPMiwSRQFuHbHQQ9s6FBr2f/DkZ3of78WH4iPuC XHJw== MIME-Version: 1.0 Received: by 10.52.95.234 with SMTP id dn10mr7938234vdb.28.1350823560658; Sun, 21 Oct 2012 05:46:00 -0700 (PDT) Received: by 10.220.186.197 with HTTP; Sun, 21 Oct 2012 05:46:00 -0700 (PDT) In-Reply-To: <5083E4C9.4000309@FreeBSD.org> References: <5083E4C9.4000309@FreeBSD.org> Date: Sun, 21 Oct 2012 16:46:00 +0400 Message-ID: Subject: Re: `pkg_add -r mongodb` failed From: Alexandr Alexeev To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 12:46:02 -0000 Thanks! BTW, MongoDB port has the same error: ===> Installing for mongodb-2.0.6_1 ===> Generating temporary packing list ===> Checking if databases/mongodb already installed ===> Creating users and/or groups. Using existing group `mongodb'. Creating user `mongodb' with uid `922'. pw: user 'mongodb' already exists *** Error code 74 Stop in /usr/ports/databases/mongodb. *** Error code 1 Stop in /usr/ports/databases/mongodb. ===>>> Installation of mongodb-2.0.6_1 (databases/mongodb) failed ===>>> Aborting update Terminated ===>>> You can restart from the point of failure with this command line: portmaster databases/mongodb How should one report errors in such cases? On Sun, Oct 21, 2012 at 4:04 PM, Matthew Seaman wrote: > On 21/10/2012 12:45, Alexandr Alexeev wrote: >> Hello. >> >> I have a problem with MongoDB installation: >> >> asus# pkg_add -r mongodb >> Fetching http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/Latest/mongodb.tbz... >> Done. >> ===> Creating users and/or groups. >> Using existing group 'mongodb'. >> Creating user 'mongodb' with uid '922'. >> pw: user 'mongodb' already exists >> pkg_add: command 'if ! /usr/sbin/pw usershow mongodb >/dev/null 2>&1; >> then echo "Creating user 'mongodb' with uid '922'."; /usr/sbin/pw >> useradd mongodb -u 922 -g 922 -c "MongoDB pseudo-user" -d >> /var/db/mongodb -s /bin/sh; else echo "Using existing user >> 'mongodb'."; fi' failed >> >> # cat /etc/passwd | grep mongodb >> mongodb:*:922:922:MongoDB pseudo-user:/var/db/mongodb:/bin/sh >> >> # cat /etc/group | grep mongodb >> mongodb:*:922: >> >> # id mongodb >> id: mongodb: no such user >> >> # pw userdel mongodb >> pw: no such user `mongodb' >> >> # uname -a >> FreeBSD asus.home 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 >> 01:47:53 UTC 2012 >> root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >> >> It seems that binary package is broken. >> > > At a guess there are added user records in /etc/master.passwd which > haven't been processed into /etc/pwd.db This will confuse applications > trying to use pw(8). > > Try running: > > # pwd_mkdb -p /etc/master.passwd > > Now 'id mongodb' should acknowledge the existence of the mongodb > account, and you should be able (re)install the mongodb pkg without it > complaining so much. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. > PGP: http://www.infracaninophile.co.uk/pgpkey > > -- Best regards, Alex Alexeev http://twitter.com/afiskon