List of active users, logged in with gdm

2008-03-12 Thread Laszlo Nagy


 Hi,

I would like to get the list of the users who are actively logged in 
remotely with gdm, along with their IP address. The commands 'w' and 
'users' does not work. What is the right command to get this list?


uname:

FreeBSD test.dyndns.org 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #4: Wed 
Aug 29 14:01:04 CEST 2007 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/DARKSUN  i386


(The computer is an application server, serving applications to diskless 
machines with gdm + gnome.)


Thanks,

  Laszlo

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: List of active users, logged in with gdm

2008-03-12 Thread Matthew Seaman

Laszlo Nagy wrote:

I would like to get the list of the users who are actively logged in 
remotely with gdm, along with their IP address. The commands 'w' and 
'users' does not work. What is the right command to get this list?


Let me turn that question around slightly:

  How can I get gdm(8) to record user logins in /var/run/utmp ?

It's the utmp file that commands like w(1) and users(1) read in order
to present the list of logged-in users.  As far as I know this is the
only effective means the system uses to record who is logged in when --
I'm not aware of any gdm(1) specific equivalent.

Now, in order for a login to be recorded in utmp(5) it should suffice to
have a line like:

 session requiredpam_lastlog.so  no_fail

in the appropriate file under /etc/pam.d or /usr/local/etc/pam.d

I'm using /etc/pam.d/xdm as a reference -- xdm(8) is functionally
similar to gdm(8) and I'd think it would have a very similar PAM
configuration.  However I haven't positively verified that, and you'ld
do well to search for PAM-related info in gdm documentation and so
forth.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature