FreeBSD 4.6.2 manual page repository
FreeBSD is a free computer operating system based on BSD UNIX originally. Many IT companies, like DeployIS is using it to provide an up-to-date, stable operating system.
adduser - command for adding new users
adduser - command for adding new users
adduser [-check_only] [-class login_class] [-config_create] [-dotdir dotdir] [-group login_group] [-h | -help] [-home home] [-message message_file] [-noconfig] [-shell shell] [-s | -silent | -q | -quiet] [-uid uid_start] [-v | -verbose]
Adduser is a simple program for adding new users. Adduser checks the passwd, group and shell databases. It creates passwd/group entries, HOME directory, dotfiles and sends the new user a welcome message.
username Login name. May contain only lowercase characters or digits. Maximum length is 16 characters (see setlogin(2) BUGS section). The reasons for this limit are "Historical". Given that people have traditionally wanted to break this limit for aesthetic rea‐ sons, it’s never been of great importance to break such a basic fundamental parameter in UNIX. You can change UT_NAMESIZE in /usr/include/utmp.h and recompile the world; people have done this and it works, but you will have problems with any precom‐ piled programs, or source that assumes the 8-character name limit and NIS. The NIS protocol mandates an 8-character username. If you need a longer login name for e-mail addresses, you can define an alias in /etc/mail/aliases. fullname Firstname and surname. The ‘:’ character is not allowed. shell Only valid shells from the shell database or sliplogin and pppd uid Automatically generated or your choice, must be less than 32000. gid/login group Your choice or automatically generated. password If not empty, password is encoded with crypt(3). Perhaps you’re 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 their 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 than 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)
1. Read internal variables. 2. Read configuration file (/etc/adduser.conf). 3. Parse command line options.
-check_only Check /etc/passwd, /etc/group, /etc/shells and exit. -class login_class Set default login class. -config_create Create new configuration and message file and exit. -dotdir directory Copy files from directory into the HOME directory of new users, ‘dot.foo’ will be renamed to ‘.foo’. Don’t copy files if directory specified is equal to no. For security make 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 means that the username is to be used as login group. -help, -h, -? Print a summary of options and exit. -home partition Default home partition where all users located. -message file Send new users a welcome message from file. Specifying a value of no for file causes no message to be sent to new users. -noconfig Do not read the default configuration file. -shell shell Default shell for new users. -silent, -s, -quiet, -q Few warnings, questions, bug reports. -uid uid Use uid’s from uid on up. -verbose, -v Many warnings, questions. Recommended for novice users.
‘#’ is a comment. configuration file Adduser reads and writes this file. See /etc/adduser.conf for more details. message file Eval variables in this file. See /etc/adduser.message for more details.
/etc/master.passwd user database /etc/group group database /etc/shells shell database /etc/login.conf login classes database /etc/adduser.conf configuration file for adduser /etc/adduser.message message file for adduser /usr/share/skel skeletal login directory /var/log/adduser logfile for adduser chpass(1), finger(1), passwd(1), setlogin(2), aliases(5), group(5), login.conf(5), passwd(5), shells(5), pw(8), pwd_mkdb(8), rmuser(8), vipw(8), yp(8)
The adduser command appeared in FreeBSD 2.1.