Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Aug 2003 13:27:50 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Antoine Jacoutot <ajacoutot@lphp.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: adding NIS users and create homedir
Message-ID:  <20030818122750.GB56809@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <200308181301.42257.ajacoutot@lphp.org>
References:  <200308181301.42257.ajacoutot@lphp.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--hHWLQfXTYDoKhP50
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 18, 2003 at 01:01:39PM +0200, Antoine Jacoutot wrote:
> Hi !
>=20
> I'm trying to add NIS users using the following command:
>=20
> pw -V /var/yp/src/nisdomain useradd -n username -u 15001,20000 -i 15001,2=
0000=20
> -w no -c "Real Name" -d /home/username -m -s /bin/sh
>=20
> It works well except that the user's home directory does not get created =
:(
> Where did I do wrong ?

You didn't do anything wrong.  The code is deliberately written so
that if you give the '-V' flag to pw(8), certain actions like creating
a user's home directory are not carried out.  This, I guess, is a
security measure, but I don't really understand it myself: pw(8)
doesn't run with any sort of raised permissions, so you have to run it
as a user with sufficient permissions to do the required actions by
other means.

Personally, when this was a concern for me, I wrote a wrapper script
that created the account and then built the home directory.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--hHWLQfXTYDoKhP50
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/QMZGdtESqEQa7a0RAoLhAJ4v1a5ho4cEh0TYt26dRyln+8cEWgCglxSd
BiQneZT9QGMqEWwwb1HEWFc=
=HWll
-----END PGP SIGNATURE-----

--hHWLQfXTYDoKhP50--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030818122750.GB56809>