Assuming these users are going to have much in common, you can do the following:
smitty -s mkuser.script -x mkuser
When started with these flags, smitty will log any scripts it would execute to the file mkuser.script, but will not actually execute them.
Input the information for one of your fifty users into the smitty screen, hit <ENTER>, and then exit from the screen telling you that the command has been logged. The mkuser.script file will now contain something like this:
Code:
#
# [Jun 08 2004, 14:15:42]
#
x() {
LIST=
SET_A=
for i in "$@"
do
if [ "$i" = "admin=true" ]
then
SET_A="-a"
continue
fi
LIST="$LIST \"$i\""
done
eval mkuser $SET_A $LIST
}
x pgrp='users' groups='users,printq' home='/home/users/testuser' shell='/bin/ksh' gecos='Test User' testuser
Pop into an editor, copy and modify the last line appropriately for the other 49 (or do it programmatically if you have a source file with the variable information already), and execute with:
ksh mkuser.script
This technique is handy for creating skeletons of scripts for all sorts of administrative functions.
Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.