Dan, Ahh, now I understand "reserved sessions." The dilema I ran into implementing reserved sessions was what happens if User A was trying to squeak a couple more words onto their resume or into a long e-mail when their session expires and User B's session is queued up immediatly behind them? Since we want to present User B with a clean session, User A's work would be lost and User A would probably be very irate.
I couldn't figure out a clean way around this problem. If you are comfortable with "Well, you should have payed attention to the warnings." then it is fairly trivial to implement. What we opted for instead was a hybred automated timed sessions and the old fashioned sign-up sheet. The sheet is the "queu" if people are waiting. The libraryian simply doles out passwords as terminal become available to people in the order they sign in and the system takes care of "kicking" them off when their time is up. I hope this is helpful. Pete -- http://www.elbnet.com ELB Internet Service, Inc. Web Design, Computer Consulting, Internet Hosting Timed Sessions for Public LTSP Kiosks All the scripts referred to here are available from http://www.elbnet.com/hplib Here is *roughly* how things work. Corrections, updates and additions to this document are welcome (and badly needed! :-). Dependencies: 1) mySQL 2) xscreensaver (running a low bandwidth slide show that tells users how the system works) 3) xmessage (to send warnings as time is running out.) 4) perl 5) perl Expect package 6) perl dbi package Notes: 1) All usernames are the same as the kiosk name. For example, username ws1 automatically logs into kiosk ws1. Note that I dropped the ws001, ws002, etc. convention so that I could easily use a counting script to loop through the workstations by simply tacking a ws in front of an integer. 2) The system is run from any Web browser and a Web server running on the LTSP server. As is common for system security reasons the Web server is run as some user other then root. As a result we need to use sudo to run some system commands that need root privilege. In general we use sudo to execute custom wrapper scripts of these system command in order to expose as little functionality as possible to the Web server. 3)You need to implement some kind of access control so users can't give them selves more time! I have this as part of my SquidGuard set up, but you can do it any number of ways. Components: 1) The script kiosk_timer is run out of init. Once each minute it checks with xsreensaver for kiosk usage times. It then compares this against the database to see how much time this person has left. We re-lock the user account for any active kiosk to prevent a patron from re-logging in once the screen saver reactivates. This does not affect them while they are actively using the kiosk and automatically relock the kiosk when the user is done, even when the finish their session early. When a user has 5 and 1 minute left in their session, we use xmessage to pop up a warning box on their screen. If they have no time left we reactivate the screensaver, locking them out of the desktop. Note that all of their work is still where they left it, so we have the ability to give "extra" time if they didn't save their work before their session ended. 2) The script safe_unlock is a very simple wrapper script for passwd that unlocks a user account. We add safe_unlock to the list of command sudo may run as root. 3) The script safe_passwd is a script to change a user's password via a cgi script. We add safe_passwd to the sudo list also. 4) The script session.cgi-script is run via cgi from the Web server. The input page ( I use simple radio buttons) must pass 3 key/value pairs: kiosk={workstation} (i.e. kiosk=ws1) New=Create New Session or New={something else}. This is the workstation that will be unlocked and if you want a new session or extend an old one. how_long=x (x is the session length) If the session is a new one, the kiosk is first cleaned up using the kiosk-reset script before unlocking the kiosk 5) The script kiosk-reset closes open programs and performs some other clean up tasks. It needs sudo permissions. 6) Example /etc/sudoers file 7) The mysql database has a table named passwords and it has four fields: passwords (contains a list of passwords to select from) kiosk (contains either a minus (-) or the kiosk this password is assigned to last (last time password was assigned) how_long (how long, in minuets, this user's session is) 8) Sample .xscreensaver file which goes in the user's home directory (name just xscreensaver so you can see it! :-) Dan Landry wrote: > > Hi Pete, > > Thanks for offering your scripts. I would be grateful to receive them. ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net
