Subject: bin/11176: useradd -m will change existing directory.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <simonb@wasabisystems.com>
List: netbsd-bugs
Date: 10/09/2000 07:32:11
>Number:         11176
>Category:       bin
>Synopsis:       useradd -m will change existing directory
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 09 07:32:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Simon Burge
>Release:        NetBSD-1.5F, 28 September 2000 sources.
>Organization:
Wasabi Systems
>Environment:
System: NetBSD alpha.thistledown.com.au 1.5F NetBSD 1.5F (THOREAU) #125:
Thu Sep 28 11:38:12 EST 2000
simonb@alpha.thistledown.com.au:/var/obj/sys/arch/alpha/compile/THOREAU alpha

>Description:
	If useradd(8) is run with the -m option and the target home
	directory already exists, it will copy the skel files into that
	directory then change the owner of the existing directory (and
	all existing subdirectories and files) to the new user.

>How-To-Repeat:
	# mkdir /home/foo
	# useradd -m foo
	Note that user "foo" now owns /home/foo

>Fix:
	None given.  Should "useradd -m" just warn if the directory already
	exists?  I'm happy to fix this if indeed the suggestion is it the
	desired behaviour.
>Release-Note:
>Audit-Trail:
>Unformatted: