[K12OSN] Very cool things happening at my school

David Trask dtrask at vcsvikings.org
Fri Oct 7 01:38:19 UTC 2005


Hi all,

Time for a report on what's happening here at VCS with my K12LTSP setup. 
(PS...for those of you in Maine...I'll be doing a hands-on session at
MaineEd next week on setting up your own K12LTSP server...K-12 Linux
Terminal Server Project)

As many of you already know...I have moved to a dual server setup with
dhcp failover/load-balancing.  I also continue to run Samba/LDAP for
authentication and housing of users and their data.  I must say that the
setup I have this year is far better than anything I've had in the
past....OpenOffice opens up in seconds....(for everyone)....Flash works
MUCH better  (We're using BrainPOP.com with no issues at all)...games like
Childsplay, GCompris, TuxType...etc...have no latency.  Kids can play
MP3's off the 'net with no problems.   I'm psyched.  The load-balancing
thing is so cool as it splits the load evenly among my two K12LTSP
servers, but also...should one go down...the other picks up the
slack....very easy to set up.

Last week wehad a major wind storm (remnants of Hurricane Rita) and as a
result we lost power sporadically for seconds at a time throughout the
day....the last time was one too many and my Samba/LDAP server went down
corrupting the LDAP database. (yes I have a UPS attached to the
server...but....)  Not that I needed it, but I have a script that backs up
users home directories (and Windows profile directories) to an NFS share
(via gigabit to another server)...hence I had a backup of /home....but I
also had a backup of my LDAP database by running slapcat -l filename.  The
server wouldn't even boot all the way due to the problem with LDAP.  Had
this been a Windows server I might have been crying.  But...it wasn't
*smiles*.  I booted into single user mode and disabled slapd so it would
boot.  Once the server was up....I deleted the LDAP database 
/var/lib/ldap and then ran  slapadd -l filename and restored my entire
LDAP database....users, passwords, and all.  Very cool.  I then did a
simple chown -R ldap:ldap /var/lib/ldap....turned slapd back on and voila!
 Back in business.   (less than 5 mins)

My latest thing has been trying to make user management easier for a
substitute computer teacher (someone subbing for me so I can go to Ubuntu
Below Zero in Montreal...or Linux World in Boston without having to worry
about what's happening back at school).  One thing I've learned this year
is that kindergarten kids can navigate the system quite well (they LOVE
TuxPaint...Bill K. Rocks!)...Childsplay, TuxPaint, GCompris...etc. 
BUT...they have a hard time logging in and logging out.  I usually log
them in after they've given it a good try (some are starting to get it). 
But logging them out was a pain.  Using Fl_TeacherTool was a good method,
but I had to be careful not to inadvertently log out other people on the
system in other rooms.  SO....I wrote a script last year (original idea by
C.T, Leung) that I use to "kill" users dead.  I call it "stop"....usage: 
stop username  (script is below)

#!/bin/sh
# usage  stop username
# stop
# script to logoff a student
#

if [ $1 != "root" ]
then
   for i in $(pgrep -u $1)
   do
      kill -9 $i
   done
else
   clear
   echo "Can't kill the root!!"
fi


A week or so ago I wrote another script to make it more user-friendly....I
call this one...stop-user   (you run it and it asks you for the
username....more friendly for a newbie....I made a launcher on the desktop
that runs in terminal)

#!/bin/bash
echo "Enter the username you wish to logoff"
read USERNAME
sudo stop $USERNAME
echo "Killing all processes for $USERNAME"

Next I have come up with a script to log off an entire class...in
particular a kindergarten class.  This script reads from a text file with
a list of names.  I call this "stopgroups"   usage:  . stopgroups filename

#!/bin/bash
cat $1 |while read LINE
do
echo "Processing $LINE"
stop $LINE
done


Example of text file is  "stop-kindergarten-class"

jsmith
mjones
jdoe
pdow
nadams
dtrask


Last I have created scripts and desktop launchers to make it easy to kill
a  specific class of users...such as Mrs. Jackson's Kindergarten
Class....(this one is called "logoff-jackson"...I have a user called
"subuser" for my substitute teacher)

#!/bin/bash
cd /home/subuser/stop-classes
. stopgroups stop-jackson

I have created launchers and put them on "subuser's" desktop so all they
have to do is double-click the icon to logoff an entire kindergarten
class.  (subuser is also a sudo user in /etc/sudoers..with rights to
execute only certain programs)

By adding some of your teachers as limited sudoers in /etc/sudoers....you
can let them do things like run Fl_TeacherTool....etc.

So as you can tell things are going well.  Things are running very
smoothly and very FAST.  (I honestly think 90% of my probs in the past
were somehow DNS related)  The dhcp failover/load-balancing thing is SO
AWESOME!  http://www.vcsvikings.org/linux/load-balance-failover-how-to.pdf
 and of course Samba/LDAP simply ROCKS!  (new version of smbldap-installer
coming very soon with cool new features such as auto-backup....I just have
to rewrite some of the docs to account for changes)  It's cool that my
system has matured to the point where I can now make it more user friendly
for other staff members...etc.  One big thing I've noticed about myself is
that I no longer use GUI tools for managing Samba/LDAP....the command line
is SO much faster!  I'm finally a true command-line user...I guess it's
the next logical step in my Linux growth.  *grins*

This is such a cool ride!  I'm having a BLAST!  (and so are the kids!)


David N. Trask
Technology Teacher/Coordinator
Vassalboro Community School
dtrask at vcsvikings.org
(207)923-3100
VE




More information about the K12OSN mailing list