Subject: admin/11709: useradd does not honor the omission of the -m option in conjunction with -d
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmaier@midamerica.net>
List: netbsd-bugs
Date: 12/12/2000 12:43:24
>Number:         11709
>Category:       admin
>Synopsis:       useradd does not honor the omission of the -m option in conjunction with -d
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    netbsd-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 12 12:43:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     John Maier
>Release:        NetBSD 1.5 release
>Organization:
>Environment:
NetBSD newmail 1.5 NetBSD 1.5 (MAIL) #6: Tue Dec  5 10:03:39 CST 2000     root@newmail:/usr/src/sys/arch/i386/compile/MAIL i386

>Description:
I omited the -m option from useradd and it still created the directory if the -d option is specified.

from adduser manpage:
-m      create a new home directory for the new user.
-d home-directory
        is the home directory which will be created and populated for the
        user, should the -m option be specified.

Additional -b is specified twice in the manpage.
>How-To-Repeat:
Notice -m is omited...

useradd -v -d /home/testme testme
Command: /bin/mkdir -p /home/testme
Command: cd /etc/skel; /bin/pax -rw -pe -v . /home/testme
/home/testme/.
/home/testme/./.cshrc
/home/testme/./.login
/home/testme/./.mailrc
/home/testme/./.profile
/home/testme/./.rhosts
Command: /usr/sbin/chown -R -h 1007:100 /home/testme
Command: /bin/chmod -R u+w /home/testme

>Fix:
nothing for the moment
>Release-Note:
>Audit-Trail:
>Unformatted: