SUMMARY: New xterm/motd/xdm interface required

From: Pete Biggs (pete@physical-chemistry.oxford.ac.uk)
Date: Tue Jun 23 1992 - 07:59:11 CDT


As usual this list comes up with the goods - I received the first reply
5 hours before my own message got back to me ;-)

I got my wrist slapped by a couple of people (including the list moderator -
sorry Mr LeFebvre), saying that this question was more appropriate for
an X specific list. In hind sight this is probably true, my only defence
is that it *was* a question about system administration!!

First my original message:

>Subject: New xterm/motd/xdm interface required
>
>Dear All,
>
> I have been using xdm for a while on workstations and have just got a
>load of xterminals that will also use xdm. However, I have noticed a few
>times that people have missed importantish messages that I've put in motd
>because the default xterm doesn't act like a normal login (which isn't
>surprising as it isn't a login shell!) and display /etc/motd. Another slight
>annoyance is that loging in via xdm doesn't leave a login record in wtmp.
>
>So, my question is this, does anybody know of
>
>i) A different xterm that does motd displaying and wtmp loging?
>OR
>ii) A different xdm that does wtmp logging
>OR
>iii) An X application that will display motd that I can run as part of
> .xsession (there is something like this for NeXT computers that I
> found in the archives, but nothing sensible for generic X).
>
>I suspect that the combination of (ii) and (iii) would be most sensible.
>

Taking the questions in order.....

i)

A couple of people suggested that various options to xterm may produce the
desired result: -ls produces a login shell, but still doesn't simulate a
"real" login; +ut does utmp loging, not wtmp loging.

Some suggested using a script that xterm runs when it starts up that cats
/etc/motd to the display.

But, the overwhelming opinion was that this was not the direction to go.

ii)
There is a program in the xdm source directory (mit/src/clients/xdm) called
sessreg (if only I had bothered to look). This program appears to do all
the necessary wtmp logging. An example of the comprehensive set of answers
I received comes from Brent Alan Wiese <brent@edu.tmc.bcm.ssctr.crick>

> There is a program called sessreg that is in the X11R4 src/client/xdm
>directory. Compile this and run something like ...
>
> sessreg -a -u none -l xdm -h $DISPLAY $USER || exit 1
>
>... for a Sun/BSD system in /usr/lib/X11/xdm/Xstartup and ...
>
> sessreg -d -u none -l xdm -h $DISPLAY $USER || exit 1
>
>... in /usr/lib/X11/xdm/Xreset. Xterms should already do utmp logging and
>I believe what I have suggested will tell when a person starts a xdm session
>on an xterminal/workstation. This is hopefully alot more useful than logging
>every xterm somebody starts.

iii)
Nearly everyone suggested using xmessage (available from your local repository
of goodies). A typical answer came from Stephen Malowany <malowany@ca.concordia.cenparmi>

>iii) There's a neat little X program called "xmessage" which can display
> the contents of a file (use archie to find the site nearest you),
> so in the Xstartup file for xdm,
>
> if [ -f /etc/nologin ]; then
> xmessage -file /etc/nologin \
> -buttons Okay -default Okay -geometry +325+50
> exit 1
> fi
>
> if [ -f /etc/motd ]; then
> xmessage -file /etc/motd \
> -buttons Continue -default Continue -geometry +325+50
> fi
>
> This will popup a window containing the motd before starting the
> Xsession. If a nologin exists, this is displayed instead, and the
> Xsession is not run.
>

However, the overwhelming number of replies suggested the xlogin program
in the X11R5 contribs directory. Here is a part of the README:

>
>ABOUT:
>------
> This program was written to do some stuff, which is no longer
>done, when using Xdm from X Windows Version 11 (and not using sessreg).
>It handles /etc/motd, /etc/nologin, user quotas (EPROCLIM, EUSERS),
>/usr/adm/lastlog, /usr/adm/wtmp, /etc/utmp and $USER/.hushlogin.
>For more information see the manual page.
> I tried to write it as secure as possible (range checking in
>strings etc.), but any further security hints are welcome.
>

Again, I suppose if I had thought about it I could have found this for
myself - that's what comes of doing an afternoon's teaching!!

The roll of honour is:

Peter Kaldis <peter@CA.Concordia.Civil>
Brent Alan Wiese <brent@edu.tmc.bcm.ssctr.crick>
phil@edu.nwu.eecs.pex (William LeFebvre)
jimbo@edu.ucsb.crseo (Jim Davidson)
sandi@za.ac.uct.cs.uctcs (Sandi Donno)
Kevin Cosgrove <kevinc%solomon%qiclab@uk.ac.nsfnet-relay>
macphed@ca.usask.dvinci (Ian MacPhedran)
storm@edu.utah.geog
kevinmac@edu.mit.ll (Kevin McElearney)
Stephen Malowany <malowany@ca.concordia.cenparmi>
Steve Seaney <seaney@edu.wisc.me.robios>
hanh@edu.fau.cse.mars (Hanh Vu - xt 2801 )
jumper@com.trw.spf (Greg Jumper)
Andy Stevens <stevens@edu.columbia.madvlsi>
Seth Robertson <seth@edu.columbia.ctr>
Kayvan Sylvan <kayvan@COM.Sylvan.satyr>
ivan@au.edu.anu.fac (Ivan Dean)
matthew@au.edu.adelaide.cs (Matthew Donaldson)
Clive Newall <clive@AU.EDU.unimelb.asis>
Scott Fritchie <fritchie@edu.stolaf>
birger@no.sdata.vest (Birger A. Wathne)

Many thanks to all the above for the many helpful comments, programs, scripts
and so on. If anyone wants the full set of replies, send me a message and
I'll gladly send you them.

Cheers,

Pete Biggs



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:43 CDT