From nobody@FreeBSD.org  Thu Mar 31 14:38:12 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB1D01065687
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Mar 2011 14:38:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id BBC8B8FC23
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Mar 2011 14:38:12 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2VEcCAS050386
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Mar 2011 14:38:12 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2VEcC1j050385;
	Thu, 31 Mar 2011 14:38:12 GMT
	(envelope-from nobody)
Message-Id: <201103311438.p2VEcC1j050385@red.freebsd.org>
Date: Thu, 31 Mar 2011 14:38:12 GMT
From: Lance Leger <laleger@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pw user flag -m does not respect custom home directory locations
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156092
>Category:       bin
>Synopsis:       pw(8) user flag -m does not respect custom home directory locations
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 31 14:40:09 UTC 2011
>Closed-Date:    Fri Jul 15 12:36:39 UTC 2011
>Last-Modified:  Fri Jul 15 12:36:39 UTC 2011
>Originator:     Lance Leger
>Release:        8.1-RELEASE-p2
>Organization:
>Environment:
>Description:
I've got an installation running from mfsroot with custom home directory locations on a seperate ufs filesystem and when I attempt to issue a "pw user mod <username> -m" command, pw gives me the following error:

pw: mkdir '/home': Read-only file system

Two issues here:

1) /home does not even exist on my system
2) the users custom home directory location is clearly defined in /etc/passwd

Now if I re-mount my mfsroot filesystem read-write, issue mkdir /home, then attempt to issue same command again it creates my users custom home directory (i.e. /d/home/user)

Another observation. If I leave the /home directory in place, re-mount my mfsroot filesystem read-only again, then attempt to issue the same command again it works (even though it has a reason now to complain that /home is read-only)
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Wed Jun 8 14:12:28 UTC 2011 
State-Changed-Why:  
I think you should define "home" (root directory for home directories) 
in /etc/pw.conf. See the pw.conf(5) manual page for details. Does this 
solve your problem? 


Responsible-Changed-From-To: freebsd-bugs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Wed Jun 8 14:12:28 UTC 2011 
Responsible-Changed-Why:  
Track. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156092 

From: Yuri Pankov <yuri.pankov@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/156092: pw(8) user flag -m does not respect custom home
 directory locations
Date: Wed, 8 Jun 2011 18:27:33 +0400

 Works just fine here.
 
 # mkdir -p /some/custom/path
 # pw useradd test -d /some/custom/path/test
 # pw usermod test -m
 # ls /some/custom/path/test/
 .cshrc        .login        .login_conf   .mail_aliases .mailrc
 .profile      .rhosts       .shrc
 
 > 2) the users custom home directory location is clearly defined in
 > /etc/passwd
 
 Use `pw usershow` here - if you just edited /etc/passwd by hand, it
 won't do much, you'll need to rebuild password database - check
 pwd_mkdb(8).
 
 
 Yuri
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Fri Jul 15 12:36:38 UTC 2011 
State-Changed-Why:  
Feedback timeout. Not believed to be a bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156092 
>Unformatted:
