From owner-freebsd-stable Mon Aug 14 14:27:10 2000 Delivered-To: freebsd-stable@freebsd.org Received: from onceler.kciLink.com (onceler.kciLink.com [204.117.82.2]) by hub.freebsd.org (Postfix) with ESMTP id F05EE37B5E2 for ; Mon, 14 Aug 2000 14:27:06 -0700 (PDT) (envelope-from khera@onceler.kciLink.com) Received: (from khera@localhost) by onceler.kciLink.com (8.9.3/8.9.3) id RAA66185; Mon, 14 Aug 2000 17:27:03 -0400 (EDT) (envelope-from khera) From: Vivek Khera MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14744.25638.954559.165195@onceler.kciLink.com> Date: Mon, 14 Aug 2000 17:27:02 -0400 (EDT) To: stable@freebsd.org Subject: how should one use the "/usr/X11R6/bin/sessreg" program in 4.x? X-Mailer: VM 6.72 under 21.1 (patch 11) "Carlsbad Caverns" XEmacs Lucid Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In my KDM configuration, I use the sessreg program to log the session into wtmp and utmp as follows: /usr/X11R6/bin/sessreg -a -w "/var/log/wtmp" -u "/var/run/utmp" \ -x "/usr/local/etc/kdm/Xservers" -l $DISPLAY -h `hostname -s` $USER where $DISPLAY is typically ":0" Similarly, the logout is logged by changing the '-a' above to '-d'. This gives me nice entries that show up in the "last" command so I can see how long and when each session was per user. Under 3.x-STABLE, this worked fine. Under 4.1-STABLE, this works ok, except when I do a "w" command I get this: [onceler]% w w: /dev/:0: No such file or directory 5:23PM up 1:07, 3 users, load averages: 2.19, 2.03, 1.61 USER TTY FROM LOGIN@ IDLE WHAT khera p0 :0.0 4:55PM - w khera p1 :0.0 4:55PM 2 rlogin kci khera p3 :0.0 4:56PM 8 /usr/libexec/cc1plus / [onceler]% who khera ttyp0 Aug 14 16:55 (:0.0) khera ttyp1 Aug 14 16:55 (:0.0) khera ttyp3 Aug 14 16:56 (:0.0) khera :0 Aug 14 16:55 (onceler) [onceler]% As you can see, the sessreg creates an active user on tty ":0", which is what is causing the heartburn for "w". Does anyone else do something like this with sessreg? What is the proper way to log in such sessions for accounting/tracking purposes? My 4.1-STABLE is as of this morning (just upgraded.) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D. Khera Communications, Inc. Internet: khera@kciLink.com Rockville, MD +1-301-545-6996 GPG & MIME spoken here http://www.khera.org/~vivek/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message