From owner-freebsd-stable Tue Aug 15 19:23:47 2000 Delivered-To: freebsd-stable@freebsd.org Received: from lafontaine.cybercable.fr (lafontaine.cybercable.fr [212.198.0.202]) by hub.freebsd.org (Postfix) with SMTP id E1EAC37B7F1 for ; Tue, 15 Aug 2000 19:23:38 -0700 (PDT) (envelope-from clefevre@cybercable.fr) Received: (qmail 1997763 invoked from network); 16 Aug 2000 02:23:36 -0000 Received: from r227m167.cybercable.tm.fr (HELO gits.dyndns.org) ([195.132.227.167]) (envelope-sender ) by lafontaine.cybercable.fr (qmail-ldap-1.03) with SMTP for ; 16 Aug 2000 02:23:36 -0000 Received: (from root@localhost) by gits.dyndns.org (8.9.3/8.9.3) id EAA28776; Wed, 16 Aug 2000 04:23:35 +0200 (CEST) (envelope-from clefevre@cybercable.fr) Original-Sender: Cyrille Lefevre Original-Sender: Cyrille Lefevre To: Vivek Khera Cc: stable@FreeBSD.ORG Subject: Re: how should one use the "/usr/X11R6/bin/sessreg" program in 4.x? References: <14744.25638.954559.165195@onceler.kciLink.com> X-Face: V|+c;4!|B?E%BE^{E6);aI.[<97Zd*>^#%Y5Cxv;%Y[PT-LW3;A:fRrJ8+^k"e7@+30g0YD0*^^3jgyShN7o?a]C la*Zv'5NA,=963bM%J^o]C In-Reply-To: Vivek Khera's message of "Mon, 14 Aug 2000 17:27:02 -0400 (EDT)" From: Cyrille Lefevre Reply-To: Cyrille Lefevre Mail-Copies-To: never Date: 16 Aug 2000 04:23:34 +0200 Message-ID: <7l9ikkpl.fsf@gits.dyndns.org> Lines: 40 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Canyonlands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Vivek Khera writes: > 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" did you read the manual page ? there are samples inside. also, the man page says you don't need to use -h as a usual way. your problem comes from -u. should be -u /var/log/lastlog. in fact, you don't need to overwrite any default options since they already point to the right files. # strings /usr/X11R6/bin/sessreg | grep / ... /var/log/wtmp -> -w /var/log/lastlog -> -u /etc/ttys -> -s so, the proper way to use sessreg is : sessreg [-a or -d] -l $DISPLAY -x /usr/X11R6/lib/X11/xdm/Xservers $LOGNAME sessreg doesn't update utmp, but wtmp and lastlog. point. # sessreg -a -l $DISPLAY -x /usr/X11R6/lib/X11/xdm/Xservers $LOGNAME # last root :0.0 Wed Aug 16 04:12 still logged in ... # sessreg -d -l $DISPLAY -x /usr/X11R6/lib/X11/xdm/Xservers $LOGNAME # last root :0.0 Wed Aug 16 04:12 - 04:13 (00:00) Cyrille. -- home: mailto:clefevre@citeweb.net work: mailto:Cyrille.Lefevre@edf.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message