19 lines
473 B
Bash
Executable file
19 lines
473 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
#
|
|
TENS="0 1 2 3"
|
|
ONES="0 1 2 3 4 5 6 7 8 9"
|
|
echo "Creating new users!" > create-users.log
|
|
for TEN in $TENS
|
|
do
|
|
for ONE in $ONES
|
|
do
|
|
USER="user$TEN$ONE"
|
|
echo "creating $USER"
|
|
PASSWORD=`perl -e "print crypt(\"$USER\", 'salt'),\"\n\""`
|
|
echo "encrypted password $PASSWORD"
|
|
echo "creating user $USER with the password $USER->$PASSWORD" >> create-users.log
|
|
useradd -s /bin/bash -d /home/$USER -p $PASSWORD -m $USER
|
|
done
|
|
done
|
|
exit 0
|