pw and adduser different checks ?

Phil Kernick philk at rotfl.com.au
Wed Nov 10 23:54:54 PST 2004


> /usr/sbin/pw useradd -ntest -ctest at test.com -d/home/test -g1000 -s/bin/sh 
> -u1000
> pw: invalid character `@' at position 4 in gecos field
> 
> Who is right of both the program ?  :-)
> 
> IMHO I find usefull to have the @ in the gecos field  because it is an easy 
> way to associate login <-> email in multidomain enviroment.
> But probably there is some drawback I am not aware of ...
> Any explanation ?

The problem is pw being unreasonably restrictive.

In the same way, you can't use pw to add a user with a $ in their name,
which is necessary for samba.


Phil.


More information about the freebsd-stable mailing list