Date: 16 Aug 2000 04:23:34 +0200 From: Cyrille Lefevre <clefevre@cybercable.fr> To: Vivek Khera <khera@kciLink.com> Cc: stable@FreeBSD.ORG Subject: Re: how should one use the "/usr/X11R6/bin/sessreg" program in 4.x? Message-ID: <7l9ikkpl.fsf@gits.dyndns.org> In-Reply-To: Vivek Khera's message of "Mon, 14 Aug 2000 17:27:02 -0400 (EDT)" References: <14744.25638.954559.165195@onceler.kciLink.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Vivek Khera <khera@kciLink.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7l9ikkpl.fsf>