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


1.1
date     91.02.05.15.28.56;  author bin;  state Exp;
branches ;
next	;


desc
@script file copied from version 310 ship disks
@



1.1
log
@Initial revision
@
text
@sort -n '-t:' +2 -3 -o /etc/passwd /etc/passwd
uid=`tail -1 /etc/passwd | sed -n "s/[^:]*:[^:]*:\\([^:]*\\).*/\\1/p"`

while expr $# "!=" "0" > /dev/null
do
	if grep "$1:.*" /etc/passwd
	then
		echo "user name '$1' already taken"
		shift
	else
		uid=`expr $uid "+" "1"`
		echo "$1::$uid:5::/u/$1:/bin/sh" >> /etc/passwd
		mkdir /u/$1
		chown $1 /u/$1
		shift
	fi
done
@
