From owner-freebsd-questions@FreeBSD.ORG Wed Mar 12 18:24:46 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E34C1065674 for ; Wed, 12 Mar 2008 18:24:46 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 595148FC2A for ; Wed, 12 Mar 2008 18:24:44 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.14.2/8.14.2) with ESMTP id m2CIOZP1056782; Wed, 12 Mar 2008 18:24:36 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.5.0 smtp.infracaninophile.co.uk m2CIOZP1056782 Message-ID: <47D81FDB.9080907@infracaninophile.co.uk> Date: Wed, 12 Mar 2008 18:24:27 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.12 (X11/20080310) MIME-Version: 1.0 To: Laszlo Nagy References: <47D80366.5040206@shopzeus.com> In-Reply-To: <47D80366.5040206@shopzeus.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig5E58F7FDB75ECCC2C3069F7F" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Wed, 12 Mar 2008 18:24:36 +0000 (GMT) X-Virus-Scanned: ClamAV 0.92.1/6212/Wed Mar 12 16:26:20 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: List of active users, logged in with gdm X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 18:24:46 -0000 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--