diff options
author | peter <peter@FreeBSD.org> | 1996-08-12 14:45:26 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-08-12 14:45:26 +0000 |
commit | 6b18c72cfcfbbcb9ef4ef47dba3d309c3ad51740 (patch) | |
tree | 1527176a279bb4dc9a6e348a851ec74ee4f7e79b /usr.bin/chpass/table.c | |
parent | 665b6e261ba076b16c6c02125a104c2297ae5a96 (diff) | |
download | FreeBSD-src-6b18c72cfcfbbcb9ef4ef47dba3d309c3ad51740.zip FreeBSD-src-6b18c72cfcfbbcb9ef4ef47dba3d309c3ad51740.tar.gz |
Add new option to chpass: -e "expire" ; change the account expire time
from a script as if it was done in the interactive editor.
When reassembling the gecos string, trim any excess trailing commas, they
look ugly in the passwd file. :-)
Have a simple Makefile tweak to prevent mortal users from changing their
fullname. As ISP's we have seem some real bizzare stuff here..
When decoding the change/expire string, allow the month number as a
synonym for the name of the month.. (ie: 1 as well as Jan or January)
Note that using numbers means there's a chance that you can get bitten
if you're not used to the American DD-MM-YY order.
Diffstat (limited to 'usr.bin/chpass/table.c')
-rw-r--r-- | usr.bin/chpass/table.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/chpass/table.c b/usr.bin/chpass/table.c index 46a12d1..3363e1d 100644 --- a/usr.bin/chpass/table.c +++ b/usr.bin/chpass/table.c @@ -50,7 +50,11 @@ ENTRY list[] = { { "class", p_class, 1, 5, e1, }, { "change", p_change, 1, 6, NULL, }, { "expire", p_expire, 1, 6, NULL, }, +#ifdef RESTRICT_FULLNAME_CHANGE /* do not allow fullname changes */ + { "full name", p_gecos, 1, 9, e2, }, +#else { "full name", p_gecos, 0, 9, e2, }, +#endif { "office phone", p_gecos, 0, 12, e2, }, { "home phone", p_gecos, 0, 10, e2, }, { "location", p_gecos, 0, 8, e2, }, |