/[LeafOK_CVS]/pvpgn-1.7.4/scripts/make_testusers.sh
ViewVC logotype

Annotation of /pvpgn-1.7.4/scripts/make_testusers.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Jun 6 03:41:37 2006 UTC (19 years, 9 months ago) by sysadm
CVS Tags: pvpgn_1-7-4-0_MIL
Branch point for: GNU, MAIN
Content type: text/x-sh
Initial revision

1 sysadm 1.1 #!/bin/sh
2    
3     # creates massive numbers of dummy "test" accounts
4    
5    
6     # number of accounts to connect with
7     numaccts=400
8    
9     # "prefix" of account names
10     name="bob"
11    
12     # account password
13     pass="bob"
14    
15     # number of zero-padded columns in suffix
16     padding=6
17    
18     # "users" directory
19     users=/usr/local/bnetd/var/users
20    
21     # bnpass command
22     bnpass=/usr/local/bnetd/bin/bnpass
23    
24    
25     hash="`echo \"${pass}\" | \"${bnpass}\" | sed -e 's/^.*"\([0-9a-f]*\)"/\1/'`"
26    
27     num=0
28     while [ "${num}" -lt 400 ]; do
29     num="`expr \"${num}\" '+' '1'`"
30     form="`printf \"%06d\" \"${num}\"`"
31     (
32     echo '"BNET\\acct\\username"="'"${name}${form}"'"'
33     echo '"BNET\\acct\\passhash1"="'"${hash}"'"'
34     echo '"BNET\\acct\\userid"="'"${num}"'"'
35     ) > "${users}/${form}"
36     done
37    
38     exit 0

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1