diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-06-04 18:04:22 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-06-04 18:04:22 +0000 |
commit | adaaf93ae3b5f89b9cd991129dbe69b29438efc2 (patch) | |
tree | 2a5035590233f6e24bdea30cd101398d530e90ce | |
parent | 3e96914188ad06b654b7595442771dd2736d95fa (diff) |
Clear up some confusion: -e is account expiry flag, -f is password
expiry flag. Resolves PR 3792, though not by changing code, but by
changing docs, comments and an error message or two.
ok jmc@ millert@
-rw-r--r-- | usr.sbin/user/user.c | 12 | ||||
-rw-r--r-- | usr.sbin/user/useradd.8 | 12 | ||||
-rw-r--r-- | usr.sbin/user/usermgmt.conf.5 | 7 | ||||
-rw-r--r-- | usr.sbin/user/usermod.8 | 9 |
4 files changed, 18 insertions, 22 deletions
diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c index ddc1f3e06e8..2a06f13d976 100644 --- a/usr.sbin/user/user.c +++ b/usr.sbin/user/user.c @@ -1,4 +1,4 @@ -/* $OpenBSD: user.c,v 1.59 2004/05/10 18:41:11 otto Exp $ */ +/* $OpenBSD: user.c,v 1.60 2004/06/04 18:04:21 otto Exp $ */ /* $NetBSD: user.c,v 1.69 2003/04/14 17:40:07 agc Exp $ */ /* @@ -77,8 +77,8 @@ typedef struct user_t { const char *u_groupv[NGROUPS_MAX]; /* secondary groups */ char *u_shell; /* user's shell */ char *u_basedir; /* base directory for home */ - char *u_expire; /* when password will expire */ - char *u_inactive; /* when account will expire */ + char *u_expire; /* when account will expire */ + char *u_inactive; /* when password will expire */ char *u_skeldir; /* directory for startup files */ char *u_class; /* login class */ unsigned int u_rsize; /* size of range array */ @@ -1045,11 +1045,11 @@ adduser(char *login_name, user_t *up) login_name); } if (!scantime(&inactive, up->u_inactive)) { - warnx("Warning: inactive time `%s' invalid, account expiry off", + warnx("Warning: inactive time `%s' invalid, password expiry off", up->u_inactive); } if (!scantime(&expire, up->u_expire)) { - warnx("Warning: expire time `%s' invalid, password expiry off", + warnx("Warning: expire time `%s' invalid, account expiry off", up->u_expire); } if (lstat(home, &st) < 0 && !(up->u_flags & F_MKDIR) && @@ -1382,7 +1382,7 @@ moduser(char *login_name, char *newlogin, user_t *up) } if (up->u_flags & F_EXPIRE) { if (!scantime(&pwp->pw_expire, up->u_expire)) { - warnx("Warning: expire time `%s' invalid, password expiry off", + warnx("Warning: expire time `%s' invalid, account expiry off", up->u_expire); } } diff --git a/usr.sbin/user/useradd.8 b/usr.sbin/user/useradd.8 index 5382a085447..01b28360d33 100644 --- a/usr.sbin/user/useradd.8 +++ b/usr.sbin/user/useradd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: useradd.8,v 1.19 2003/12/22 12:06:16 jmc Exp $ +.\" $OpenBSD: useradd.8,v 1.20 2004/06/04 18:04:21 otto Exp $ .\" $NetBSD: useradd.8,v 1.26 2003/02/25 10:36:21 wiz Exp $ .\" .\" Copyright (c) 1999 Alistair G. Crooks. All rights reserved. @@ -128,8 +128,7 @@ option is specified and no .Fl d option is specified. .It Fl e Ar expiry-time -sets the default time at which the current password will expire for new -users. +sets the default time at which new accounts will expire. It should be entered in the form .Dq month day year , where month is the month name (the first three characters are @@ -137,7 +136,7 @@ sufficient), day is the day of the month, and year is the year. Time in seconds since the epoch (UTC) is also valid. A value of 0 can be used to disable this feature. .It Fl f Ar inactive-time -sets the default time at which new user accounts will expire. +sets the time at which passwords of new accounts will expire. Also see the .Fl e option above. @@ -185,8 +184,7 @@ should the .Fl m option be specified. .It Fl e Ar expiry-time -sets the time at which the current password will expire for new -users. +sets the time at which the user account will expire. It should be entered in the form .Dq month day year , where month is the month name (the first three characters are @@ -197,7 +195,7 @@ See .Xr passwd 5 for more details. .It Fl f Ar inactive-time -sets the time at which new user accounts will expire. +sets the time at which the current password will expire. Also see the .Fl e option above. diff --git a/usr.sbin/user/usermgmt.conf.5 b/usr.sbin/user/usermgmt.conf.5 index a171453d878..6d6f46cd45c 100644 --- a/usr.sbin/user/usermgmt.conf.5 +++ b/usr.sbin/user/usermgmt.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: usermgmt.conf.5,v 1.2 2003/06/15 06:40:15 jmc Exp $ +.\" $OpenBSD: usermgmt.conf.5,v 1.3 2004/06/04 18:04:21 otto Exp $ .\" $NetBSD: usermgmt.conf.5,v 1.3 2002/10/02 13:49:11 grant Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -66,8 +66,7 @@ See .Xr login.conf 5 for more information on user login classes. .It Ic expire -sets the default time at which the current password expires. -This can be used to implement password aging. +sets the default time at which the new accounts expire. Both the .Ar expire and @@ -93,7 +92,7 @@ It has the format: .Ar gid | name | Li =uid .Ed .It Ic inactive -sets the default time at which new accounts expire. +sets the default time at which the passwords of new accounts expire. A value of 0 can be used to disable this feature. Also see the .Ar expire diff --git a/usr.sbin/user/usermod.8 b/usr.sbin/user/usermod.8 index 82ec182cfd8..364d3f9cdc8 100644 --- a/usr.sbin/user/usermod.8 +++ b/usr.sbin/user/usermod.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: usermod.8,v 1.16 2003/09/04 08:32:15 jmc Exp $ +.\" $OpenBSD: usermod.8,v 1.17 2004/06/04 18:04:21 otto Exp $ .\" $NetBSD: usermod.8,v 1.17 2003/02/14 16:11:37 grant Exp $ .\" .\" Copyright (c) 1999 Alistair G. Crooks. All rights reserved. @@ -86,15 +86,14 @@ without populating it; if the option is specified, tries to move the old home directory to .Ar home-directory . .It Fl e Ar expiry-time -sets the time at which the current password expires. -This can be used to implement password aging. +sets the time at which the account expires. It should be entered in the form .Dq month day year , where month is the month name (the first three characters are sufficient), day is the day of the month, and year is the year. Time in seconds since the epoch (UTC) is also valid. A value of 0 can be used to disable this feature. -This value can be preset for all users using the +This value can be preset for new users using the .Ar expire field in the .Pa /etc/usermgmt.conf @@ -103,7 +102,7 @@ See .Xr usermgmt.conf 5 for more details. .It Fl f Ar inactive-time -sets the time at which the account expires. +sets the time at which the password expires. See the .Fl e option. |