From owner-freebsd-questions@FreeBSD.ORG Mon Aug 18 05:28:07 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 572B937B401 for ; Mon, 18 Aug 2003 05:28:07 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8644043FB1 for ; Mon, 18 Aug 2003 05:28:05 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h7ICRpC7057214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Aug 2003 13:27:58 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h7ICRp2G057213; Mon, 18 Aug 2003 13:27:51 +0100 (BST) (envelope-from matthew) Date: Mon, 18 Aug 2003 13:27:50 +0100 From: Matthew Seaman To: Antoine Jacoutot Message-ID: <20030818122750.GB56809@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Antoine Jacoutot , freebsd-questions@freebsd.org References: <200308181301.42257.ajacoutot@lphp.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" Content-Disposition: inline In-Reply-To: <200308181301.42257.ajacoutot@lphp.org> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-8.0 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-questions@freebsd.org Subject: Re: adding NIS users and create homedir X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2003 12:28:07 -0000 --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--