From owner-freebsd-arch@FreeBSD.ORG Wed Oct 22 01:23:33 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 776801065671 for ; Wed, 22 Oct 2008 01:23:33 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 4324C8FC0C for ; Wed, 22 Oct 2008 01:23:32 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (HPooka@thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.3/8.14.3) with ESMTP id m9M15LZr041423 for ; Tue, 21 Oct 2008 20:05:21 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Tue, 21 Oct 2008 20:05:21 -0500 (CDT) From: "Sean C. Farley" To: freebsd-arch@FreeBSD.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Status: No, score=-4.3 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: Subject: pw -V user add/del cancels out -m/-r X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 01:23:33 -0000 Recently, someone reported an issue to me with using -V along with -m or -r when adding or deleting a user via pw, respectively. The user's home directory is not being created nor deleted. >From looking at the code, it appears that this is intended. I would expect it to look in the new /etc directory for all needed files (i.e., skel) to create the directory, but this is prevented due to the _altdir flag[1]. Would anyone know the full story behind this behavior when -V is provided? Before I change this, I would like to know all the consequences. It happened only over nine years ago; I am sure it is fresh in everyone's memory. ;) The only apparent issue I see is if the user added to the alternate /etc files has the same UID and/or GID of an existing user in the base system. If I change anything I think I should make -V apply to all /etc files (i.e., opiekeys, skel). They can always be overridden if desired. Sean 1. http://svn.freebsd.org/viewvc/base/head/usr.sbin/pw/pw_user.c?revision=44229&view=markup -- scf@FreeBSD.org