Less known Solaris features: Defaults for useradd

One of the lesser known features of useradd command is the ability to set defaults for the creation of users, nevertheless is featured prominently on the man page.
When you want to see the currently set defaults, you can do this by appending a -D to useradd:

bash-3.2# useradd -D
group=other,1  project=default,3  basedir=/home
skel=/etc/skel  shell=/bin/sh  inactive=0
expire=  auths=  profiles=  roles=  limitpriv=
defaultpriv=  lock_after_retries=

When you want to change the default basedir to /export/home for example, you can do with this command:

bash-3.2# useradd -D -b /export/home
group=other,1  project=default,3  basedir=/export/home
skel=/etc/skel  shell=/bin/sh  inactive=0
expire=  auths=  profiles=  roles=  limitpriv=
defaultpriv=  lock_after_retries=

Do you want to learn more?

docs.oracle.com: man page of useradd(1m)