ADDUSER(8)

NAME
adduser - command for adding new users

SYNOPSIS
adduser [-batch username [group[,group]...] [fullname] [password]] [-check_only] [-config_create] [-dotdir dotdir] [-group login_group] [-h|-help] [-home home] [-message message_file] [-noconfig] [-shell shell] [-s|-silent|-q|-quit] [-uid uid_start] [-v|-verbose]

DESCRIPTION
Adduser is a simple program for adding new users. Adduser check passwd, group and shell database. It create passwd/group entry, HOME-directory, dotfiles and send new user a welcome message.

RESTRICTION
username
    Login name. Only lowercase characters or digits.
fullname
    Firstname and surname. ‘’ not allowed.
shell
    Only valid shells from shell database or sliplogin and pppd
uid Automatically generated or your choice. Less than 32000.
gid/login group
    Your choice or automatically generated.
password
    If not empty password is encoded with crypt.

UNIQ GROUP
Perhaps your missing what *can* be done with this scheme that falls apart with most other schemes. With each user in his/her own group the user can safely run with a umask of 002 and have files created in there home directory and not worry about others being able to read them. For a shared area you create a separate uid/gid (like cvs or ncvs on freefall), you place each person that should be able to access this area into that new group. This model of uid/gid administration allows far greater flexibility that lumping users into groups and having to muck with the umask when working in a shared area. I have been using this model for almost 10 years and found that it works for most situations, and has never gotten in the way. (Rod Grimes)

CONFIGURATION
1.  Read intern variables.
2.  Read config file (/etc/adduser.conf)
3.  Parse command line options

OPTIONS

-batch username [group[,group]...] [fullname] [password]
    Batch mode.

-check_only
    Check /etc/passwd, /etc/group, /etc/shells and exit.

-create_config
    Create new config and message file and exit.

-dotdir directory
    Copy files from directory into the HOME-directory of new users. ‘dot.foo’ files renamed to ‘.foo’ Don't copy files if directory equal with no For security make a all files writable and readable for owner, don't allow group or world to write files and allow only owner to read/execute/write .rhost, .Xauthority, .kermrc, .netrc, Mail, prv, iscreen, term.

-group login_group
    Login group. USER mean use username as login group.

-help,-h,-?
    Print options and exit.

-home partition
    Default home partition where all users located.

-message file
    Send new users a welcome message. Don't send message if file equal with no

-noconfig
    Do not read config file.

-shell shell
    Default shell for new users.

-silent,-s,-quit,-q
    Few warnings, question, bug reports.

-uid uid
    Use uid's from uid up.

-verbose,-v
    Many warning, question. Recommended for novice users.

FORMATS
‘#’ is a comment.
config file
    Adduser read and write this file. See /etc/adduser.conf for more details.
message file
    Eval variables in this file. See /etc/adduser.message for more details.

EXAMPLES

$ adduser

Start adduser in interactive mode.

$ adduser -batch baerenklau guest,staff,baer 'Teddy II' qwerty7

Create user 'baerenklau' and login group 'baerenklau'. Invite user baerenklau into groups guest, staff and baer. Realname (fullname) is 'Teddy II'. Password is 'qwerty7' (don't use such password!). Create HOME directory '/home/baerenklau' and copy all files and directories from /usr/share/skel to /home/baerenklau. Send user baerenklau a welcome message.

$ adduser -uid 5000 -group guest -message no -batch vehlefanz

Create user 'vehlefanz'. Login group is guest. Uid is up to 5000, for instance 5007. No other groups, no realname, no password. Do not send a welcome message.

FILES
/etc/master.passwd
    user database
/etc/group
    group database
/etc/shells
    shell database
/etc/adduser.conf
    config file for adduser
/etc/adduser.message
    message file for adduser
/usr/share/skel
    skeletal login directory
/var/log/adduser
    logfile for adduser

SEE ALSO
chpass(1), finger(1), passwd(1), aliases(5), passwd(5), group(5), shells(5), pwd_mkdb(8), vipw(8)

HISTORY
The adduser command appeared in FreeBSD 2.1