View Single Post
Light Poster
1Jul2007,21:12  
larrenV2.003's Avatar
here is my source code

need some advice

Code:
#!/bin/sh
sux=”sux”
dash=”-“
passwd_1=”123pass”

gad=”groupadd”
g=”-g”
gid=747
re=”IMFDelegates”

vi=”vi”
ep=”/etc/password”

uid=1900
num=0
u=”user”
cross=”x”
iname_1=”Secret”
iname_2=”Agent”
homedir=”/home/agent”
logshell=”bin/sh”
p=”passwd”
password_2=”p@Ss”


$sux $dash 	#input command line sux – to enter root
$passwd_1	#input password 123pass

$gad $g $gid $re	#create group with command line groupadd –g 747 IMFDelegates

while [ $num –lt 99]
do
echo $vi  $ep
echo $u:$cross:$uid:$gid:$iname_1 $iname_2$num:$homedir$cross:$logshell
echo $p $u$num
echo $passwd_2$num
num=$((num+1))
done

echo “All 99 user accounts created”