bin/117751: Make pw(8) support "-d" argument

Ivan Voras ivoras at freebsd.org
Sat Nov 17 10:09:27 PST 2007


On 16/11/2007, remko at freebsd.org <remko at freebsd.org> wrote:
> Synopsis: Make pw(8) support "-d" argument

> As discussed in private, -d is currently being used in pw useradd for
> example to specify what the homedirectory of the user will be, the
> option you are talking about could not be found by my (quick) check of
> the manual, could you please specify this?

My idea is to make pw useradd honor the -d argument, not introduce a
new one.  For example:

BEFORE the patch:

> ls -l /home/
total 2
drwxr-xr-x  29 ivoras  ivoras  1536 Nov 10 19:30 ivoras/
> ls -ls /buildcd/livecd/home/
total 0

# pw -V /buildcd/livecd/etc useradd test -G wheel -m -d
/buildcd/livecd/home/test
# ls -l /home/
total 2
drwxr-xr-x  29 ivoras  ivoras  1536 Nov 10 19:30 ivoras/
# ls -l /buildcd/livecd/home/
total 0
finstall:/buildcd/livecd/etc#
# tail -n1 /buildcd/livecd/etc/passwd
test:*:1001:1002:User &:/buildcd/livecd/home/test:/bin/sh

AFTER the patch:

# pw -V /buildcd/livecd/etc useradd test -G wheel -m -d
/buildcd/livecd/home/test
# ls -l /home/
total 2
drwxr-xr-x  29 ivoras  ivoras  1536 Nov 10 19:30 ivoras/
# ls -l /buildcd/livecd/home/
total 2
drwxr-xr-x  2 1002  1002  512 Nov 16 09:36 test/

This is the intended behaviour: ^^^^^^^^^^^^^^^^^^^^^^^^^^


More information about the freebsd-bugs mailing list