head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2004.03.09.20.06.42;	author garbled;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Apply patches from PR bin/24695 by Peter Postma:
        The changes are:

        * rename "Security and Users" to "Users and Groups"
        * use default settings in /etc/usermgmt.conf (if it exists)
          when adding a new user.
        * fix output for 'List users'.
        * add the following menu's: Modify user, Change password, Add group,
          List groups, Delete group.
@
text
@#!/bin/sh
# $NetBSD$

if [ -n "$6" -a "$6" != "NEVER" ]; then
	CTIME=`date +%s`
	EXPIRE=`expr $6 \* 24 \* 60 \* 60 + $CTIME`
	EXPIRE=`echo "-e $EXPIRE"`
fi

ID=`id -u $1`
if [ $8 -eq $ID  ]; then
	UID=""
else
	UID="-u $8"
fi

if [ -z $3 ]; then
	SG=""
else
	SG="-G $3"
fi

usermod -g $2 $SG -c "$4" -d "$5" $EXPIRE -s $7 $UID -v $1
if [ $? -eq 0 ]; then
	echo "User $1 successfully modified."
fi
@
