From owner-freebsd-questions@FreeBSD.ORG Sun Oct 21 12:04:41 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 3A5FC4B7 for ; Sun, 21 Oct 2012 12:04:41 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id B5C228FC08 for ; Sun, 21 Oct 2012 12:04:40 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q9LC4W71089241 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sun, 21 Oct 2012 13:04:32 +0100 (BST) (envelope-from matthew@FreeBSD.org) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q9LC4W71089241 Authentication-Results: smtp.infracaninophile.co.uk/q9LC4W71089241; dkim=none (no signature); dkim-adsp=none Message-ID: <5083E4C9.4000309@FreeBSD.org> Date: Sun, 21 Oct 2012 13:04:25 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: `pkg_add -r mongodb` failed References: In-Reply-To: X-Enigmail-Version: 1.4.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig87BF8BB5B0ED78562C65CB56" X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk 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:04:41 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig87BF8BB5B0ED78562C65CB56 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 21/10/2012 12:45, Alexandr Alexeev wrote: > Hello. >=20 > I have a problem with MongoDB installation: >=20 > asus# pkg_add -r mongodb > Fetching http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stabl= e/Latest/mongodb.tbz... > Done. > =3D=3D=3D> 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 >=20 > # cat /etc/passwd | grep mongodb > mongodb:*:922:922:MongoDB pseudo-user:/var/db/mongodb:/bin/sh >=20 > # cat /etc/group | grep mongodb > mongodb:*:922: >=20 > # id mongodb > id: mongodb: no such user >=20 > # pw userdel mongodb > pw: no such user `mongodb' >=20 > # 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 >=20 > It seems that binary package is broken. >=20 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 --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --------------enig87BF8BB5B0ED78562C65CB56 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCD5M8ACgkQ8Mjk52CukIyD8gCfS354Q/m6r2qyp5jzaqahUlK9 zrkAn2X6eB+id2Ir/W7KRmOz3iDBrDwh =V5Tu -----END PGP SIGNATURE----- --------------enig87BF8BB5B0ED78562C65CB56--