LTSP users, admins, and developers, What about a more expansive, global, and adaptive approach to the utmp/wtmp/sessreg problem?
See the following messages discussing prior solutions to this problem: Ken Godee: http://sourceforge.net/mailarchive/message.php?msg_id=198655 Derek Dresser: http://sourceforge.net/mailarchive/message.php?msg_id=1166304 Philip A. Roa: http://sourceforge.net/mailarchive/message.php?msg_id=1299193 And this message that I have here, but that somehow doesn't come up in the Sourceforge mailing list search: > Date: Fri, 01 Mar 2002 21:01:42 -0500 > From: David Johnston <[EMAIL PROTECTED]> > Subject: Re: [Ltsp-discuss] Knowing exactly who is currently logged-in > > I changed two files to fix this. With these changes, if you are using > GDM, `who` will look like this: > # who > david ws05:0 Mar 1 20:18 (ws05) > beth ws02:0 Mar 1 12:08 (ws02) > > Here are the changes: > Put this in /etc/X11/gdm/PreSession/Default: > #!/bin/sh > if [ -x /usr/bin/X11/sessreg ]; then > HOST=`echo $DISPLAY | cut -f1 -d: | cut -d\. -f1` > Display=:`echo $DISPLAY | cut -f2 -d:` > /usr/bin/X11/sessreg -a -w /var/log/wtmp -u /var/run/utmp -l > $HOST$Display -h $HOST $USER > fi > > Put this in /etc/X11/gdm/PostSession/Default: > #!/bin/sh > if [ -x /usr/bin/X11/sessreg ]; then > HOST=`echo $DISPLAY | cut -f1 -d: | cut -d\. -f1` > Display=:`echo $DISPLAY | cut -f2 -d:` > /usr/bin/X11/sessreg -d -w /var/log/wtmp -u /var/run/utmp -l > $HOST$Display -h $HOST $USER > fi Finally, there's Ken Godee's WSMON Perl/Tk program with GiveConsole and TakeConsole modifications <http://www.perfect-image.com/wsmon/>: > if [ ${DISPLAY} = ":0.0" ] ; then > ltsp=$DISPLAY > else > ltsp=${DISPLAY%%.*.*} > fi All of these solutions depend on various assumptions about the environment and the LTSP client hostnames. They were all developed on a specific platform (Red Hat Linux 7.x) and, as seen recently, do not work with other distros or in situations in which the assumptions made do not apply (strange FQDN). From the WSMON readme file: "assume: 8 max characters for usernames 8 max characters for groupnames full name equals two words ie. "John Doe" not ie. "John Thomas Doe". Assumes workstations are on local domain only. Workstations naming schem must start with "ws" ie "ws001" This allows program to report on LTSP workstations only." If people name their clients strangely, then simply trimming $DISPLAY down to just the hostname may not be enough. With a 4 character ut_id field, one must assure that the appropriate set of four characters is being used, otherwise every client is assigned the same ut_id string (original problem). I'm wondering if under the new (still under development) v3.0.1 installation/configuration system, it would be possible to include an optional procedure to detect the status of utmp/wtmp logging on the system and to modify it if necessary? How difficult would this be? I'm thinking it could scan the {Give|Take}Console scripts for the 'sessreg' command and parse for the argument given to the '-l' option ($DISPLAY, probably) and then scan again for how this argument is being modified (if at all). Then it could scan the /etc/hosts and/or the lts.conf file (or ask the administrator) for the naming scheme of the workstations. It could then determine the domain of the network and from these determine the appropriate set of 4 characters to use as the argument to the '-l' option of sessreg. It could then modify the {Give|Take}Console scripts to perform the appropriate modifications on $DISPLAY, using the values discovered above. This approach should be general enough to avoid distro-specific problems (e.g.: Debian) and should allow admins who don't want to muck around with their login logging system to install LTSP and have all of their existing tools (w, who, last, Gkrellm, etc.) *just work*. Admittedly, it's probably not a *huge* selling point for LTSP, but a rough edge that it would be nice to round out. I could probably write this in Bash and awk or sed, but currently all the install/config scripts are in Perl. I guess it could also just be an add-on package under contribs, thereby allowing someone to write it in whatever language they want... I really wanted it to become a core part of the LTSP install. It seems like several people have already put in a lot of time to get a grip on this problem and that it might be ready for "prime-time". Thoughts? Anyone interested? Or did I just volunteer myself? :-) Jason _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _____________________________________________________________________ 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.openprojects.net