Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/user Pull up revision 1.5-1.9 (requested by si...



details:   https://anonhg.NetBSD.org/src/rev/fe7d5db19ce6
branches:  netbsd-1-4
changeset: 471176:fe7d5db19ce6
user:      he <he%NetBSD.org@localhost>
date:      Wed Oct 25 17:06:42 2000 +0000

description:
Pull up revision 1.5-1.9 (requested by simonb):
  Synchronize to current versions of the user management tool.
  Fixes PR#11100, PR#11103, PR#11123 and PR#10985.

diffstat:

 usr.sbin/user/useradd.8 |  151 +++++++++++++++++++++++++++++++----------------
 1 files changed, 98 insertions(+), 53 deletions(-)

diffs (274 lines):

diff -r 9f48b97f4bb6 -r fe7d5db19ce6 usr.sbin/user/useradd.8
--- a/usr.sbin/user/useradd.8   Wed Oct 25 17:06:20 2000 +0000
+++ b/usr.sbin/user/useradd.8   Wed Oct 25 17:06:42 2000 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: useradd.8,v 1.4.4.2 2000/01/21 00:01:14 he Exp $ */
+.\" $NetBSD: useradd.8,v 1.4.4.3 2000/10/25 17:06:42 he Exp $ */
 .\"
 .\"
 .\" Copyright (c) 1999 Alistair G. Crooks.  All rights reserved.
@@ -39,71 +39,101 @@
 .Nd add a user to the system
 .Sh SYNOPSIS
 .Nm ""
-.Op Fl D
+.Fl D
 .Op Fl b Ar base-dir
 .Op Fl e Ar expiry-time
 .Op Fl f Ar inactive-secs
-.Op Fl g Ar gid/name/=uid
-.Op Fl r Ar low..high
+.Oo
+.Fl g Ar gid | name | Li =uid Oc
+.Oo
+.Op Fl k Ar skel-dir
+.Fl r Ar low Ns Li .. Ns Ar high
+.Oc
+.Op Fl s Ar shell
 .Nm ""
+.Op Fl mov
 .Op Fl G Ar secondary-group
 .Op Fl b Ar base-dir
 .Op Fl c Ar comment
 .Op Fl d Ar home-dir
 .Op Fl e Ar expiry-time
 .Op Fl f Ar inactive-secs
-.Op Fl g Ar gid/name/=uid
+.Oo
+.Fl g Ar gid | name | Li =uid Oc
 .Op Fl k Ar skel-dir
-.Op Fl m
-.Op Fl o
 .Op Fl p Ar password
-.Op Fl r Ar low..high
+.Oo
+.Fl r Ar low Ns Li .. Ns Ar high
+.Oc
 .Op Fl s Ar shell
 .Op Fl u Ar uid
-.Op Fl v
-user
+.Ar user
 .Sh DESCRIPTION
 The
 .Nm useradd
 utility adds a user to the system, creating and
 populating a home directory if necessary.
-Any skeleton dot files will be provided
-for the new user if they exist in the /etc/skel directory.
-Default values for the base directory, the time of password expiry,
+Any skeleton files will be provided
+for the new user if they exist in the
+.Pa /etc/skel
+directory.
+Default values for
+the base directory,
+the time of password expiry,
+seconds until password change,
+primary group,
 the skeleton directory,
-seconds until password change, primary group, the range from which the uid will be
-allocated,
-and default login shell can be provided in the /etc/usermgmt.conf
+the range from which the uid will be allocated,
+and default login shell
+can be provided in the
+.Pa /etc/usermgmt.conf
 file.
 .Pp
-The first format of the command shown above (utilising the -D option)
+The first format of the command shown above (utilising the
+.Fl D
+option)
 sets and displays the defaults for the
 .Nm
 utility.
 .Bl -tag -width Ds
 .It Fl D
-without any further options, -D will show the current defaults which
+without any further options,
+.Fl D
+will show the current defaults which
 will be used by the
 .Nm
 utility. Together with one of the options shown for the first version
-of the command, -D will set the default to be the new value.
+of the command,
+.Fl D
+will set the default to be the new value.
 .It Fl b Ar base-dir
 sets the base directory. This is the directory to which the user name
-is added, which will be created if the -m option is specified and no
--d option is specified.
+is added, which will be created if the
+.Fl m
+option is specified and no
+.Fl d
+option is specified.
 .It Fl e Ar expiry-time
-sets the time at which the current password will expire for this user.
+sets the time at which the current password will expire for new users.
 .It Fl f Ar inactive-secs
 sets the number of seconds after which, if no login has occurred for
-the user during that time, the login will be "locked".
-.It Fl g Ar gid/groupname/=uid
+the user during that time, the login will be
+.Dq locked .
+.It Fl g Ar gid | groupname | Li =uid
 sets the default group for any user added using the
 .Nm
 command.
-.It Fl r Ar low..high
+.It Fl k skel-dir
+sets the skeleton directory in which to find files with
+which to populate new users' home directories.
+.It Xo
+.Fl r Ar low Ns Li .. Ns Ar high
+.Xc
 sets the low and high bounds of uid ranges for new users. A new user
 can only be created if there are uids which can be assigned from one
 of the free ranges.
+.It Fl s
+sets the login shell for new users.
 .El
 .Pp
 In the second form of the command,
@@ -111,8 +141,9 @@
 the command line options are processed:
 .Bl -tag -width Ds
 .It Fl G Ar secondary-group
-is the secondary group to which the user will be added in
-the /etc/group file.
+is the secondary group to which the user will be added in the
+.Pa /etc/group
+file.
 .It Fl b Ar base-directory
 is the base directory name, in which the user's new home
 directory will be created, should the -m option be specified.
@@ -120,9 +151,9 @@
 by using the
 .Ar base_dir
 field in the
-.Xr /etc/usermgmt.conf
+.Pa /etc/usermgmt.conf
 file - it has the format:
-.Ar base_dir <path-to-base-dir> .
+.D1 Ic base_dir Ar path-to-base-dir
 .It Fl c Ar comment
 is the comment field (also, for historical reasons known as the
 GECOS field) which will be added for the user, and typically will include
@@ -144,27 +175,37 @@
 by using the
 .Ar expire
 field in the
-.Xr /etc/usermgmt.conf
+.Pa /etc/usermgmt.conf
 file - it has the format:
-.Ar expire <secs-to-expiry> .
-.It Fl g Ar gid/name/=uid
+.D1 Ic expire Ar secs-to-expiry
+.It Fl g Ar gid | name | Li =uid
 gives the group name or identifier to be used for the new user's primary group.
 If this is
-.Ar "-g=uid" ,
+.Ql =uid ,
 then a uid and gid will be picked which are both unique
 and the same, and a line added to
-.Ar /etc/group
+.Pa /etc/group
 to describe the new group.
 This value can be preset for all users
 by using the
 .Ar gid
 field in the
-.Xr /etc/usermgmt.conf
+.Pa /etc/usermgmt.conf
 file - it has the format:
-.Ar group <groupname/groupid/=uid> .
+.br \" XXX This shouldn't be needed -- mdoc bug? --bjh21
+.Bd -ragged -offset indent -compact
+.Ic group
+.Ar gid | name | Li =uid
+.Ed
 .It Fl k Ar skeleton directory
-gives the skeleton directory in which to find dot files
+gives the skeleton directory in which to find files
 with which to populate the new user's home directory.
+This value can be preset for all users by using the
+.Ar skel_dir
+field in the
+.Pa /etc/usermgmt.conf
+file - it has the format:
+.Ar skel_dir <path-to-skeleton-dir> .
 .It Fl m
 create a new home directory for the new user.
 .It Fl o
@@ -178,27 +219,29 @@
 by using the
 .Ar password
 field in the
-.Xr /etc/usermgmt.conf
+.Pa /etc/usermgmt.conf
 file - it has the format:
-.Ar password <encrypted-password> .
+.D1 Ic password Ar encrypted-password
 .It Fl s Ar shell
 specifies the login shell for the new user.
 This value can be preset for all users
 by using the
 .Ar shell
 field in the
-.Xr /etc/usermgmt.conf
+.Pa /etc/usermgmt.conf
 file - it has the format:
-.Ar shell <login-shell> .
+.D1 Ic shell Ar login-shell
 .It Fl u Ar uid
 specifies a uid for the new user.
 Boundaries for this value can be preset for all users
 by using the
 .Ar range
 field in the
-.Xr /etc/usermgmt.conf
+.Pa /etc/usermgmt.conf
 file - they have the format:
-.Ar range <starting-uid>..<ending-uid> .
+.Bd -unfilled -offset indent -compact
+.Ic range Ar starting-uid Ns Li .. Ns Ar ending-uid
+.Ed
 .It Fl v
 enables verbose mode - explain the commands as they are executed.
 .El
@@ -206,6 +249,18 @@
 The
 .Nm
 utility exits 0 on success, and >0 if an error occurs.
+.Sh FILES
+.Bl -tag -width /etc/usermgmt.conf -compact
+.It Pa /etc/usermgmt.conf
+.It Pa /etc/skel/*
+.El
+.Sh SEE ALSO
+.Xr chpass 1 ,
+.Xr passwd 5 ,
+.Xr group 5 ,
+.Xr user 8 ,
+.Xr userdel 8 ,
+.Xr usermod 8
 .Sh HISTORY
 The
 .Nm
@@ -218,13 +273,3 @@
 The
 .Nm
 utility was written by Alistair G. Crooks (agc%netbsd.org@localhost).
-.Sh SEE ALSO
-.Xr chpass 1 ,
-.Xr passwd 5 ,
-.Xr group 5 ,
-.Xr user 8 ,
-.Xr userdel 8 ,
-.Xr usermod 8 ,
-.Xr /etc/usermgmt.conf ,
-.Xr /etc/skel/.[A-z]* ,
-.Xr /usr/share/examples/usermgmt



Home | Main Index | Thread Index | Old Index