Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2008 18:24:27 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Laszlo Nagy <gandalf@shopzeus.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: List of active users, logged in with gdm
Message-ID:  <47D81FDB.9080907@infracaninophile.co.uk>
In-Reply-To: <47D80366.5040206@shopzeus.com>
References:  <47D80366.5040206@shopzeus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig5E58F7FDB75ECCC2C3069F7F
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Laszlo Nagy wrote:

> I would like to get the list of the users who are actively logged in=20
> remotely with gdm, along with their IP address. The commands 'w' and=20
> '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

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


--------------enig5E58F7FDB75ECCC2C3069F7F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEAREIAAYFAkfYH+MACgkQ8Mjk52CukIyBZwCfZF3LpN2W0TsukIMpG667zrdi
ufoAmJ5u81UrwyUPvesngch2DanjyBA=
=MCCT
-----END PGP SIGNATURE-----

--------------enig5E58F7FDB75ECCC2C3069F7F--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47D81FDB.9080907>