Jedes Semester muessen die Passwoerter fuer 12teams erstellt werden, da ich dass nicht manuell mache wie andere leider tun, hier ein 20min Script, welches das Problem besser loest. Ich habe noch weitere files:
Ich verwende auch lp um die files zu drucken, also um genau zu gehen das file "printfile". Der Vorteil, ich kann ein Dokument erstellen, es miniFAQ nennen, dann wird vom Script unten automatisch ein passwort generiert, diese dann gleich mit passwd dem entsprechenden User zugeordnet. Dann wird noch der miniFAQ_trailer angehaengt und das ganze ausgedruckt. Ihr braucht auch noch das Programm pwgen, ich habe es als binary runtergeladen und ins gleiche Verzeichnis wie dieses gepackt. Das Script#!/bin/sh
#
# passwort generator mit labmeeting blatt extension
# (c) Joachim Schiele 2005 04 15
#
clear;
echo ""
echo "This little script will print out 14 papers with a miniFAQ and passwords"
echo "for each team"
echo "It will change all passwords for team01 .. team15 in /etc/shadows"
echo ""
echo "use this script with care, now type the number"
echo ""
OPTIONS="Passwords Quit"
select opt in $OPTIONS; do
if [ "$opt" = "Quit" ]; then
echo done
exit
elif [ "$opt" = "Passwords" ]; then
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 14 15;
do
cat miniFAQ > printfile
./pwgen 8 1 > .pass
password=`cat .pass`
useradd team$i
echo " user: team$i" >> printfile
echo " pass: $password" >> printfile
echo $password | passwd team$i --stdin
cat miniFAQ_trailer >> printfile
lp printfile
sleep 2;
done
echo "Job done. Type 2 to exit now."
else
clear
echo bad option
fi
done
Hier mal ein Entwurf.__ __ __ .__ ___.
|__| _____/ |_ ___________ ____ _____/ |_ | | _____ \_ |__
| |/ \ __\/ __ \_ __ \/ \_/ __ \ __\ | | \__ \ | __ \
| | | \ | \ ___/| | \/ | \ ___/| | | |__/ __ \| \_\ \
|__|___| /__| \___ >__| |___| /\___ >__| |____(____ /___ /
\/ \/ \/ \/ \/ \/
2005
Dear team,
here are some things you need to know for working in the lab.
Consider this a small FAQ :-)
=========== some random notes ==========================================
1. do not use the lab computer to store configuration files, they get
reinstalled from time to time so you might loose all your files.
You better store your files on strasbourg, use your account.
2. for data transfer use "scp" or "konqueror"
in konqueror you have to type: "fish://team03@strasbourg", you'll
get asked for a password, afterwards you can use a second konqueror
to drag'n'drop your files from your local computer to strasbourg.
3. printing: you need to print some things in later labs, you may use
the printer in the lab room for that, ask for help with it.
YOU MAY NOT USE THE PRINTER FOR THINGS, OTHER THAN CLOSELY
RELATED TO THE LAB, AS SCRIPTS or WHATEVER!
3. printing: you need to print some things in later labs, you may use
the printer in the lab room for that, ask for help with it.
YOU MAY NOT USE THE PRINTER FOR THINGS, OTHER THAN CLOSELY
RELATED TO THE LAB, AS SCRIPTS or WHATEVER!
4. If you need more time for a lab you can ask for another schedule.
If there is really nobody in the lab, you should check that first,
you can continue with your work.
5. Please answer the questions in English. You can use
http://dict.leo.org to check your spelling or to translate words ;-)
6. Please power off every computer and cisco router after you're done.
=========== Internet issues ============================================
You have to use the Internet to be able to answer questions and to
solve problems with your configuration. Note that only strasbourg is
really connected to the WSI net so you have to use your account,
aka team03 for example, to access the Internet.
There is a link in the main menu, after you logged into a lab pc
with your account:
-> this part, the next two lines, are generated with pwgen
You will find an icon with a globe and a mouse, click it ... and a
browser should show up.
You might need to add a proxy for http, ... if not already done so:
http://www-cache:3128 https://www-cache:3128 ftp://www-cache:3128
=========== your account ===============================================
user: foobar
pass: barfoo
- Please change your password. Do this on strasbourg, use "passwd".
We wish you lots of fun & success during the labs ... ;-)
![]() |