Mahesh,

This is excellent information.  Any chance I could get you to add it to
the LTSP Wiki?

Jim McQuillan
[EMAIL PROTECTED]



On Wed, 11 May 2005, Mahesh M. wrote:

> Hello,
>
> After digging through ltsp mail archives i could make
> last, who, w commands operate properly in ltsp
> environment.
>
> I modified the files sessenv, GiveConsole,
> TakeConsole, xdm-config for this purpose. The details
> are given below.
>
> The following sites were useful.
>
> 1. Derek Dresser's tips on ltsp contrib site.
> 2.  Knowing exactly who is currently logged-in. David
> Johnston.
>
> http://www.mail-archive.com/[email protected]/msg03434.html
> 3.  Knowing exactly who is currently logged-in -
> Solved Philip A. Roa
>
> http://www.mail-archive.com/[email protected]/msg03725.html
>
> Details:
>
> I created a bash script /etc/X11/xdm/sessenv
> -----snip----------
> #!/bin/bash
> #
> # modification for proper who, w operation
>
> HOST=`echo $DISPLAY | cut -f1 -d: | cut -d\. -f1`
> DISP=:`echo $DISPLAY | cut -f2 -d:`
> if [ -z $HOST ]
> then
>       HOST=$HOSTNAME
> fi
> -----snap----------
>
> Then modified /etc/X11/xdm/GiveConsole
>
> -----snip----------
> #!/bin/sh
> #
> chown $USER /dev/console
>
> # modification for proper who,w
> source '/etc/X11/xdm/sessenv'
> /usr/X11R6/bin/sessreg  -a -w "/var/log/wtmp" -u
> "/var/run/utmp" \
>       -x "/etc/X11/xdm/Xservers" -l $HOST$DISP  -h $HOST
> $USER
> -----snap---------
>
> Then modified /etc/X11/xdm/TakeConsole
>
> ------snip--------
> #!/bin/sh
> #
> chmod 622 /dev/console
> chown root /dev/console
>
> # modification for proper who,w
> source '/etc/X11/xdm/sessenv'
> /usr/X11R6/bin/sessreg -d -w "/var/log/wtmp" -u
> "/var/run/utmp" \
>       -x "/etc/X11/xdm/Xservers" -l $HOST$DISP  -h $HOST
> $USER
> -----snap--------
>
> And  /etc/X11/xdm/xdm-config
>
> -----snip-------
> DisplayManager*setup: /etc/X11/xdm/Xsetup_0
> DisplayManager*startup:       /etc/X11/xdm/GiveConsole
> DisplayManager*reset: /etc/X11/xdm/TakeConsole
> -----snap-------
>
> regards,
> Mahesh M.
>
>
> --- "Mahesh M." <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> >
> > Thanks to everyone for your suggestions.
> >
> > I configured xdm to update utmp and wtmp using
> > /etc/X11/xdm/xdm-config
> >
> > The "last" command now registers login and logout.
> > But
> > the command "who" and "w" still do not list the
> > current users logged in. They list only the most
> > recent user logged in.
> >
> > # who
> > admin    tty1         May  9 10:08
> > user1     in048.intern:0 May  9 11:55
> >
> > I get strange results in my "last" output like "gone
> > -
> > no logout". Here is an extract:
> >
> > ---snip---------
> > user1     in048.intern                  Mon May  9
> > 11:55    gone - no logout
> > user2   in046.intern                  Mon May  9
> > 11:47
> >    gone - no logout
> > user3  pts/1                         Mon May  9
> > 11:30
> > - 11:33  (00:03)
> > user4 in024.intern                  Mon May  9 11:30
> > -
> > 11:42  (00:12)
> > user5  in046.intern                  Mon May  9
> > 11:28
> > - 11:46  (00:17)
> > user6  in022.intern                  Mon May  9
> > 11:28
> > - 11:34  (00:06)
> > user7   in007.intern                  Mon May  9
> > 11:25
> > - 11:55  (00:30)
> > user7   in050.intern                  Mon May  9
> > 11:23
> >    gone - no logout
> > user8 in041.intern                  Mon May  9 11:22
> >
> >  gone - no logout
> > -----snap-----------
> >
> > Here is an extract of xdm-config.
> >
> > -----snip---------
> > !DisplayManager._0.authorize:       true
> > DisplayManager*authorize:   true
> > ! The following three resources set up display :0 as
> > the console.
> > DisplayManager*setup:       /etc/X11/xdm/Xsetup_0
> > DisplayManager*startup:     /etc/X11/xdm/GiveConsole
> > DisplayManager*reset:       /etc/X11/xdm/TakeConsole
> > !
> > DisplayManager*resources:   /etc/X11/xdm/Xresources
> > DisplayManager*session:             /etc/X11/xdm/Xsession
> > DisplayManager*authComplain:        false
> > -----snap----------
> >
> > Is there some misconfiguration?
> >
> >
> > Thanks in advance
> > Mahesh M.
> >
> > --- Jim McQuillan <[EMAIL PROTECTED]> wrote:
> >
> > > Mahesh,
> > >
> > > The problem is, on your system, XDM isn't
> > configured
> > > to update utmp and
> > > wtmp, so the users don't show up as logged in,
> > even
> > > tho they have
> > > definately logged in.
> > >
> > > Derek Dresser wrote up some notes on how to fix
> > > this.  It's on the LTSP
> > > contrib page.  You might find enough info there to
> > > fix your problem.
> > >
> > > Jim McQuillan
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > > On Wed, 4 May 2005, Mahesh M. wrote:
> > >
> > > > Hi,
> > > >
> > > > Thanks for reply. I tried "last -a |grep still".
> > > It
> > > > also gives the list of users who have a terminal
> > > open.
> > > > Users who have only graphical applications
> > running
> > > are
> > > > not listed.
> > > >
> > > > I examined the output of "last -a" it maintains
> > > only
> > > > the history of users who have opened a terminal.
> > > >
> > > > Could there be a configuration error in
> > > XDM/IceWM/NIS?
> > > >
> > > > regards,
> > > > Mahesh M.
> > > >
> > > >
> > > >
> > > >
> > > > --- Gideon Romm <[EMAIL PROTECTED]>
> > > wrote:
> > > >
> > > > > last -a|grep still
> > > > >
> > > > > On Wed, 2005-05-04 at 09:27, Mahesh M. wrote:
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I want to find out who are the users
> > currently
> > > > > logged
> > > > > > in to the ltsp server. But when I use
> > command
> > > > > "who" i
> > > > > > get only users who have opened any terminal
> > > > > "xterm".
> > > > > > The users who are logged in and using only
> > > > > graphical
> > > > > > applications like opera, xpdf etc are not
> > > listed.
> > > > > But
> > > > > > when i use "top" to list the processes i can
> > > see
> > > > > the
> > > > > > users and the applications they are running.
> > > > > >
> > > > > > The ltsp server I am using is configured as
> > a
> > > NIS
> > > > > > client authenticating from a separate NIS
> > > server.
> > > > > I
> > > > > > use XDM login, IceWM-1.2.20 desktop.
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > best regards,
> > > > > > Mahesh M.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
> _____________________________________________________________________
> 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
>


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_____________________________________________________________________
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

Reply via email to