My /etc/default/useradd
file is as follow:
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
man
page for useradd
provides many obvious options for when I use the useradd
binary.
It also says in the man
page:
/etc/default/useradd
Default values for account creation.
But it doesn't specify what values are valid within this file.
I have tried using the options for the useradd
binary in this file but they seem to be ignored.
2015/04/02 Update:
So I should probably do some clarifications:
I am used to the debian style useradd and adduser
I'm working now, in a CentOS system and there really only is useradd.
The whole point in any of this work is to modify the base user creation for a standard practice, by default:
$ sudo useradd someuser
$ cat /etc/passwd
someuser:x:1002:1002::/home/someuser:/bin/bash
$ groups someuser
someuser : someuser
I was hoping that I could just modify /etc/default/useradd to set some basics like:
GROUPS=wheel,dialout,tftp
DIR_MODE=1770
But these sorts of mods to the /etc/default/useradd file are just ignored. I could just write some simple bash script to feed useradd the defaults, but would rather not if there's just some simple config I am overlooking.
Thanks
strings /usr/sbin/useradd
but there's probably a more direct and "correct" way of doing it than that.