File: genusers

package info (click to toggle)
libuser 1%3A0.64~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,092 kB
  • sloc: ansic: 16,599; python: 2,555; sh: 877; yacc: 782; makefile: 235; xml: 106
file content (24 lines) | stat: -rwxr-xr-x 562 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
userlist() {
	uid=$1
	max=$2
	while [ "$uid" -lt "$max" ] ; do
		echo "joe${uid}:password${uid}:${uid}:${uid}:joe with uid ${uid}:/var/joe${uid}:/bin/bash"
		uid=`expr $uid + 1`
		echo "joe${uid}:password${uid}:${uid}:joe${uid}:joe with uid ${uid}:/var/joe${uid}:/bin/bash"
		uid=`expr $uid + 1`
		echo "joe${uid}:password${uid}:${uid}:users:joe with uid ${uid}:/var/joe${uid}:/bin/bash"
		uid=`expr $uid + 1`
	done
}
if [ x$1 = x ] ; then
	uid=50000
else
	uid=$1
fi
if [ x$2 = x ] ; then
	count=50
else
	count=$2
fi
userlist $uid `expr $uid + $count`