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


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

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


desc
@@


1.2
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: script,v 1.1 2001/01/05 02:07:00 garbled Exp $

if [ -n "$6" ]; then
	CTIME=`date +%s`
	EXPIRE=`expr $6 \* 24 \* 60 \* 60 + $CTIME`
	EXPIRE=`echo "-e $EXPIRE"`
fi
if [ -z $5 ]; then
	if [ -r "/etc/usermgmt.conf" ]; then
		BASE=`grep base_dir /etc/usermgmt.conf | awk '{print $2}'`
	fi
	if [ -n "$BASE" ]; then
		HOME=`echo "${BASE}/${1}"`
	else
		HOME=`echo "/home/${1}"`
	fi
else
	HOME=$5
fi
if [ -z $8 ]; then
	UID=""
else
	UID="-u $8"
fi
if [ $3 != "NONE" ]; then
	SG="-G $3"
fi
useradd $SG $UID -c "$4" -d $HOME $EXPIRE -g $2 -m -s $7 -v $1
if [ $? -eq 0 ]; then
	echo "User $1 successfully created"
fi
@


1.1
log
@Add all the help menus, and working menu items I currently have for sushi.

Note, these directories are missing Makefiles..  I know that.. and I'm
working on it.
@
text
@d1 5
a5 4
#!/bin/sh -x
# $NetBSD$
CTIME=`date +%s`
if [ ! -z $6 ]; then
d10 8
a17 2
	HOME=`grep base_dir /etc/usermgmt.conf | awk '{print $2}'`
	HOME=`echo "${HOME}/${1}"`
@

