List Info

Thread: List of active users, logged in with gdm




List of active users, logged in with gdm
country flaguser name
Hungary
2008-03-12 11:23:02
  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     
gandalftest.dyndns.org:/usr/obj/usr/src/sys/DARKSUN  i386

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

Thanks,

   Laszlo

_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"

Re: List of active users, logged in with gdm
country flaguser name
United Kingdom
2008-03-12 13:24:27
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         required        pam_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.i
nfracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11
9PW

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )