1996-08-27 20:04:45 +00:00
|
|
|
.\" Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
|
|
|
|
.\" All rights reserved.
|
1995-01-09 11:26:31 +00:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
1996-08-27 20:04:45 +00:00
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
1995-01-09 11:26:31 +00:00
|
|
|
.\"
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1997-09-01 06:14:17 +00:00
|
|
|
.\"
|
1997-06-23 04:52:13 +00:00
|
|
|
.Dd January 9, 1995
|
1995-01-09 11:26:31 +00:00
|
|
|
.Dt ADDUSER 8
|
2001-07-10 15:12:08 +00:00
|
|
|
.Os
|
1994-12-30 12:03:48 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm adduser
|
1995-01-09 11:26:31 +00:00
|
|
|
.Nd command for adding new users
|
1995-03-08 22:44:37 +00:00
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2000-11-10 17:46:15 +00:00
|
|
|
.Bk -words
|
1996-12-23 00:10:22 +00:00
|
|
|
.Op Fl check_only
|
1997-05-01 22:55:58 +00:00
|
|
|
.Op Fl class Ar login_class
|
1996-12-23 00:10:22 +00:00
|
|
|
.Op Fl config_create
|
|
|
|
.Op Fl dotdir Ar dotdir
|
|
|
|
.Op Fl group Ar login_group
|
|
|
|
.Op Fl h | help
|
|
|
|
.Op Fl home Ar home
|
|
|
|
.Op Fl message Ar message_file
|
|
|
|
.Op Fl noconfig
|
|
|
|
.Op Fl shell Ar shell
|
|
|
|
.Op Fl s | silent | q | quiet
|
|
|
|
.Op Fl uid Ar uid_start
|
|
|
|
.Op Fl v | verbose
|
2000-11-10 17:46:15 +00:00
|
|
|
.Ek
|
1994-12-30 12:03:48 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is a simple program for adding new users. It checks
|
2000-03-01 14:09:25 +00:00
|
|
|
the passwd, group and shell databases.
|
|
|
|
It creates passwd/group entries,
|
1997-09-01 06:14:17 +00:00
|
|
|
.Ev HOME
|
|
|
|
directory, dotfiles and sends the new user a welcome message.
|
1996-12-23 00:10:22 +00:00
|
|
|
.Sh RESTRICTIONS
|
1995-01-09 11:26:31 +00:00
|
|
|
.Bl -tag -width Ds -compact
|
|
|
|
.It Sy username
|
2000-03-06 09:45:37 +00:00
|
|
|
Login name.
|
|
|
|
May contain only lowercase characters or digits.
|
2000-03-01 14:09:25 +00:00
|
|
|
Maximum length
|
2001-07-15 08:06:20 +00:00
|
|
|
is 16 characters (see
|
1996-06-09 20:45:35 +00:00
|
|
|
.Xr setlogin 2
|
2001-07-15 08:06:20 +00:00
|
|
|
BUGS section).
|
|
|
|
The reasons for this limit are "Historical".
|
1996-06-09 20:45:35 +00:00
|
|
|
Given that people have traditionally wanted to break this
|
|
|
|
limit for aesthetic reasons, it's never been of great importance to break
|
|
|
|
such a basic fundamental parameter in UNIX.
|
2001-07-15 08:06:20 +00:00
|
|
|
You can change
|
|
|
|
.Dv UT_NAMESIZE
|
|
|
|
in
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pa /usr/include/utmp.h
|
|
|
|
and recompile the
|
1996-06-09 20:45:35 +00:00
|
|
|
world; people have done this and it works, but you will have problems
|
|
|
|
with any precompiled programs, or source that assumes the 8-character
|
2000-03-01 14:09:25 +00:00
|
|
|
name limit and NIS.
|
|
|
|
The NIS protocol mandates an 8-character username.
|
1996-06-09 20:45:35 +00:00
|
|
|
If you need a longer login name for e-mail addresses,
|
|
|
|
you can define an alias in
|
2000-08-13 18:38:58 +00:00
|
|
|
.Pa /etc/mail/aliases .
|
1995-01-09 11:26:31 +00:00
|
|
|
.It Sy fullname
|
2001-07-15 08:06:20 +00:00
|
|
|
Firstname and surname.
|
1996-12-23 00:10:22 +00:00
|
|
|
The
|
2000-12-27 15:30:30 +00:00
|
|
|
.Ql Pa \&:
|
1996-12-23 00:10:22 +00:00
|
|
|
character is not allowed.
|
1995-01-09 11:26:31 +00:00
|
|
|
.It Sy shell
|
1996-12-23 00:10:22 +00:00
|
|
|
Only valid shells from the shell database or sliplogin and pppd
|
1995-01-09 11:26:31 +00:00
|
|
|
.It Sy uid
|
1996-12-23 00:10:22 +00:00
|
|
|
Automatically generated or your choice, must be less than 32000.
|
1995-03-08 22:44:37 +00:00
|
|
|
.It Sy gid/login group
|
2001-07-15 08:06:20 +00:00
|
|
|
Your choice or automatically generated.
|
1995-03-08 22:44:37 +00:00
|
|
|
.It Sy password
|
2001-07-15 08:06:20 +00:00
|
|
|
If not empty, password is encoded with
|
1996-12-23 00:10:22 +00:00
|
|
|
.Xr crypt 3 .
|
1995-01-09 11:26:31 +00:00
|
|
|
.El
|
1996-12-23 00:10:22 +00:00
|
|
|
.Sh UNIQUE GROUPS
|
2001-07-15 08:06:20 +00:00
|
|
|
Perhaps you're missing what
|
1996-12-23 00:10:22 +00:00
|
|
|
.Em can
|
|
|
|
be done with this scheme that falls apart
|
1995-03-08 22:44:37 +00:00
|
|
|
with most other schemes. With each user in his/her own group the user can
|
1996-08-28 17:54:14 +00:00
|
|
|
safely run with a umask of 002 and have files created in their home directory
|
1995-03-08 22:44:37 +00:00
|
|
|
and not worry about others being able to read them.
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pp
|
1996-01-30 13:52:50 +00:00
|
|
|
For a shared area you create a separate uid/gid (like cvs or ncvs on freefall),
|
1995-03-08 22:44:37 +00:00
|
|
|
you place each person that should be able to access this area into that new
|
|
|
|
group.
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pp
|
1996-08-28 17:54:14 +00:00
|
|
|
This model of uid/gid administration allows far greater flexibility than lumping
|
1995-03-08 22:44:37 +00:00
|
|
|
users into groups and having to muck with the umask when working in a shared
|
|
|
|
area.
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pp
|
1995-03-08 22:44:37 +00:00
|
|
|
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)
|
1995-01-09 11:26:31 +00:00
|
|
|
.Sh CONFIGURATION
|
1997-09-01 06:14:17 +00:00
|
|
|
.Bl -enum
|
|
|
|
.It
|
|
|
|
Read internal variables.
|
|
|
|
.It
|
|
|
|
Read configuration file (/etc/adduser.conf).
|
|
|
|
.It
|
|
|
|
Parse command line options.
|
1995-01-09 11:26:31 +00:00
|
|
|
.El
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl check_only
|
1995-03-08 22:44:37 +00:00
|
|
|
Check /etc/passwd, /etc/group, /etc/shells and exit.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl class Ar login_class
|
1997-09-01 06:14:17 +00:00
|
|
|
Set default login class.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl config_create
|
2001-07-15 08:06:20 +00:00
|
|
|
Create new configuration and message file and exit.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl dotdir Ar directory
|
2001-07-15 08:06:20 +00:00
|
|
|
Copy files from
|
|
|
|
.Ar directory
|
1997-09-01 06:14:17 +00:00
|
|
|
into the
|
|
|
|
.Ev HOME
|
|
|
|
directory of new users,
|
1995-01-09 11:26:31 +00:00
|
|
|
.Ql Pa dot.foo
|
2001-07-15 08:06:20 +00:00
|
|
|
will be renamed to
|
1996-08-28 17:54:14 +00:00
|
|
|
.Ql Pa .foo .
|
1995-01-09 11:26:31 +00:00
|
|
|
Don't copy files if
|
2001-07-15 08:06:20 +00:00
|
|
|
.Ar directory
|
1996-12-23 00:10:22 +00:00
|
|
|
specified is equal to
|
1996-08-28 17:54:14 +00:00
|
|
|
.Ar no .
|
|
|
|
For security make all files writable and readable for owner,
|
1995-03-08 22:44:37 +00:00
|
|
|
don't allow group or world to write files and allow only owner
|
2001-07-15 08:06:20 +00:00
|
|
|
to read/execute/write
|
|
|
|
.Pa .rhost ,
|
|
|
|
.Pa .Xauthority ,
|
|
|
|
.Pa .kermrc ,
|
|
|
|
.Pa .netrc ,
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pa Mail ,
|
2001-07-15 08:06:20 +00:00
|
|
|
.Pa prv ,
|
|
|
|
.Pa iscreen ,
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pa term .
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl group Ar login_group
|
2001-07-15 08:06:20 +00:00
|
|
|
Login group.
|
1995-03-08 22:44:37 +00:00
|
|
|
.Ar USER
|
1997-09-01 06:14:17 +00:00
|
|
|
means that the username is to be used as login group.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl help , h , \&?
|
1997-09-01 06:14:17 +00:00
|
|
|
Print a summary of options and exit.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl home Ar partition
|
1995-03-08 22:44:37 +00:00
|
|
|
Default home partition where all users located.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl message Ar file
|
1997-09-01 06:14:17 +00:00
|
|
|
Send new users a welcome message from
|
|
|
|
.Ar file .
|
|
|
|
Specifying a value of
|
|
|
|
.Ar no
|
|
|
|
for
|
2001-07-15 08:06:20 +00:00
|
|
|
.Ar file
|
1997-09-01 06:14:17 +00:00
|
|
|
causes no message to be sent to new users.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl noconfig
|
1997-09-01 06:14:17 +00:00
|
|
|
Do not read the default configuration file.
|
2001-07-15 08:06:20 +00:00
|
|
|
.It Fl shell Ar shell
|
1995-03-08 22:44:37 +00:00
|
|
|
Default shell for new users.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl silent , s , quiet , q
|
2001-07-15 08:06:20 +00:00
|
|
|
Few warnings, questions, bug reports.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl uid Ar uid
|
2001-07-15 08:06:20 +00:00
|
|
|
Use uid's from
|
1995-03-08 22:44:37 +00:00
|
|
|
.Ar uid
|
1996-12-23 00:10:22 +00:00
|
|
|
on up.
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Fl verbose , v
|
2000-03-01 14:09:25 +00:00
|
|
|
Many warnings, questions.
|
|
|
|
Recommended for novice users.
|
2000-12-27 15:30:30 +00:00
|
|
|
.El
|
1995-01-09 11:26:31 +00:00
|
|
|
.Sh FORMATS
|
|
|
|
.Bl -tag -width Ds -compact
|
|
|
|
.Ql Pa #
|
2001-07-15 08:06:20 +00:00
|
|
|
is a comment.
|
1997-09-01 06:14:17 +00:00
|
|
|
.It Sy configuration file
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility reads and writes this file.
|
2001-07-15 08:06:20 +00:00
|
|
|
See
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pa /etc/adduser.conf
|
|
|
|
for more details.
|
1995-01-09 11:26:31 +00:00
|
|
|
.It Sy message file
|
2000-03-01 14:09:25 +00:00
|
|
|
Eval variables in this file.
|
|
|
|
See
|
1996-12-23 00:10:22 +00:00
|
|
|
.Pa /etc/adduser.message
|
|
|
|
for more
|
1995-01-09 11:26:31 +00:00
|
|
|
details.
|
|
|
|
.El
|
1994-12-30 12:03:48 +00:00
|
|
|
.Sh FILES
|
1995-01-09 11:26:31 +00:00
|
|
|
.Bl -tag -width /etc/master.passwdxx -compact
|
|
|
|
.It Pa /etc/master.passwd
|
|
|
|
user database
|
|
|
|
.It Pa /etc/group
|
|
|
|
group database
|
|
|
|
.It Pa /etc/shells
|
|
|
|
shell database
|
1997-05-01 22:55:58 +00:00
|
|
|
.It Pa /etc/login.conf
|
|
|
|
login classes database
|
1995-01-09 11:26:31 +00:00
|
|
|
.It Pa /etc/adduser.conf
|
1997-09-01 06:14:17 +00:00
|
|
|
configuration file for adduser
|
1995-01-09 11:26:31 +00:00
|
|
|
.It Pa /etc/adduser.message
|
|
|
|
message file for adduser
|
|
|
|
.It Pa /usr/share/skel
|
|
|
|
skeletal login directory
|
|
|
|
.It Pa /var/log/adduser
|
|
|
|
logfile for adduser
|
|
|
|
.El
|
1994-12-30 12:03:48 +00:00
|
|
|
.Sh SEE ALSO
|
1995-01-09 11:26:31 +00:00
|
|
|
.Xr chpass 1 ,
|
|
|
|
.Xr finger 1 ,
|
|
|
|
.Xr passwd 1 ,
|
1996-06-09 20:45:35 +00:00
|
|
|
.Xr setlogin 2 ,
|
1995-01-09 11:26:31 +00:00
|
|
|
.Xr aliases 5 ,
|
|
|
|
.Xr group 5 ,
|
1997-05-01 22:55:58 +00:00
|
|
|
.Xr login.conf 5 ,
|
1997-01-20 00:03:00 +00:00
|
|
|
.Xr passwd 5 ,
|
1995-01-09 11:26:31 +00:00
|
|
|
.Xr shells 5 ,
|
1998-08-17 18:50:29 +00:00
|
|
|
.Xr pw 8 ,
|
1995-01-09 11:26:31 +00:00
|
|
|
.Xr pwd_mkdb 8 ,
|
1996-11-17 03:51:33 +00:00
|
|
|
.Xr rmuser 8 ,
|
2002-01-14 16:59:03 +00:00
|
|
|
.Xr vipw 8 ,
|
|
|
|
.Xr yp 8
|
1995-01-09 11:26:31 +00:00
|
|
|
.\" .Sh BUGS
|
1994-12-30 12:03:48 +00:00
|
|
|
.Sh HISTORY
|
1995-01-09 11:26:31 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility appeared in
|
1996-08-23 00:57:08 +00:00
|
|
|
.Fx 2.1 .
|