Date: Sun, 21 Oct 2012 13:04:25 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: `pkg_add -r mongodb` failed Message-ID: <5083E4C9.4000309@FreeBSD.org> In-Reply-To: <CAEMZj=mCo3ZBV85EdukFB0XTKKUHZcC%2BEh=VR%2BUunjdZDPEaiA@mail.gmail.com> References: <CAEMZj=mCo3ZBV85EdukFB0XTKKUHZcC%2BEh=VR%2BUunjdZDPEaiA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 [-- Attachment #2 --] -----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-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5083E4C9.4000309>
