wtmp and xdm

wtmp and xdm

Post by Michael Haard » Thu, 16 Feb 1995 05:26:30

> Please tell me that this is only true in 2.3.  We're switching
> to 2.4 (and a new machine) precipitously just so we can do session
> accounting.  (And proper billing;-(

I can't say what's up with 2.4, in 2.3 (suggested patches of the latest
SunSolve CD plus many others applied) utmp certainly still does not
work right.  I have not looked if this is the fault of programs
interpreting utmp wrong (e.g. BSDish) or if the file is not updated
right, but since the bug is known, what good does it do to look.  As a
speaker at a Sun meeting said: Solaris is a banana product, it ripens
at the customer.  I may add, if only it would.

Twiggs and root are a wonderful tree (tm) Twiggs & root 1992 :-)
d? H- s(+)/(-) g! au a- w+ v(---) C++(+++) UL++++S++++$?++++ L++ 3 E-


1. xdm, $DISPLAY, wtmp on Sol 2.3

        Thanks for the responses to this. I should note that under 4.1.3
it wasn't quite the same setup, and I indeed never had trouble then.

Now, thanks to one of the kind respondees, here is what worked for
getting the proper DISPLAY variable, and then getting logged with wtmp.
This assumes that there is at least one person in the same boat, though
I'm sure many of the more knowledgeable managers would have figured this
out already.

I needed to do a few things.

First I had to learn about /usr/openwin/sessreg.
Following the man page, I made up Xstartup and and Xreset files.
Then I also changed the DisplayManager._0.authorize resource to
true. I would have thought this obvious, but on SUNOS 4.1, I had
it 'false'.
Here is the xdm-config file - I added the last two lines as well.

/usr/local/lib/X11/xdm> more xdm-config
DisplayManager.errorLogFile:    /var/adm/xdm-errors
DisplayManager.pidFile:         /var/adm/xdm-pid
DisplayManager.keyFile:         /var/adm/xdm-keys
DisplayManager.servers:         /usr/local/lib/X11/xdm/Xservers
DisplayManager.accessFile:      /usr/local/lib/X11/xdm/Xaccess
DisplayManager._0.authorize:    true
#DisplayManager._0.setup:       /usr/local/lib/X11/xdm/Xsetup_0
DisplayManager*startup:         /usr/local/lib/X11/xdm/Xstartup
DisplayManager*reset:           /usr/local/lib/X11/xdm/Xreset
DisplayManager*resources:       /usr/local/lib/X11/xdm/Xresources
DisplayManager*session:         /usr/local/lib/X11/xdm/Xsession
DisplayManager*authComplain:    false
DisplayManager*daemonMode:      true
DisplayManager*removeDomainname: false

This last line is what had been screwing up the DISPLAY variable.
You see, if just left to its own devices (no pun intended) the Xsession
file used to give DISPLAY as something like avocet:0.0. ANd of course,
I could never get that script from Sun to work (the one you and I stepped
through a while ago).

The Xstartup file is

# Xstartup
# This program is run as root after the user is verified
#/etc/xdm/printenv >> log.environ
#/usr/bin/tty >> log.environ
#/etc/xdm/wtmp_update $USER login $DISPLAY
/usr/openwin/bin/sessreg -a -l $DISPLAY -x /usr/local/lib/X11/xdm/Xservers

while Xreset is;

# Xreset
# This program is run at the end of a session
#/etc/xdm/printenv >> log.environ
#/usr/bin/tty >> log.environ
#/etc/xdm/wtmp_update $USER login $DISPLAY
/usr/openwin/bin/sessreg -d -l $DISPLAY -x  /usr/local/lib/X11/xdm/Xservers

and now, the Xservers file is empty, whereas I used to list all of the



2. vi editor FAQ (Frequently Asked Question List), Part 1/2

3. xdm->wtmp entry

4. UNIX Help - Script

5. sessreg/xdm wtmp problem, Solaris 2.3

6. VMware Bridged Networking Woes :(

7. wtmp and xdm

8. install applications from packages

9. xdm, login and utmp/wtmp

10. q:xdm and wtmp

11. Mysterious wtmp entries from xdm (kdm) logins

12. xdm and sessreg: wtmp/utmp

13. no entries in wtmp after running xdm