Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 1999 08:45:36 -0800 (PST)
From:      jbarbee@singular.com (John Barbee)
To:        Greg Black <gjb@comkey.com.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Making my login class capabilities database work right on 2.2.5
Message-ID:  <Pine.BSF.4.05.9902100823480.28204-100000@server7.singular.com>
In-Reply-To: <19990210005928.19381.qmail@alpha.comkey.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 10 Feb 1999, Greg Black wrote:

> I think you've completely missed the point of this --
> w/who/finger don't do anything except read a database that has
> been updated by programs involved with the login process.  So,
> even if you really want this extra functionality, it doesn't
> belong there -- it has to be part of the X logins that you're
> concerned about.
no disagreement there.  what i was trying to do doesn't violate this.
w/who/finger would still read the databases.

> I don't care about this issue, because I prefer to have every
> xterm write in the utmp file and it's trivial to arrange with my
> Xresources file.  But, if I cared about this, I would spend a
well, i'm sure andrew lankford thanks you for your attention, as do i.

> few minutes with the sources of xlogout and one of the programs
> that does update utmp, and I'd add the utmp update stuff to
> xlogout.
> Then I'd make xlogout the non-background program in my .xsession
> file and then, for no effort to speak of, I'd have something
> that would put an entry in utmp when I logged in, that would
> give me a button to press when I wanted to logout, and that
> would remove the utmp entry when I logged out.  Quick, easy, and
> maybe even something you could contribute to the world.
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ i thought that's why we're here on the
list for.  if we're not asking questions, we're helping others.

greg, your proposed solution has almost the identical concept to what
andrew and i were talking about a few days ago when andrew first queried
the list. allow me to bring in an excerpt of a message from a few days ago
between andrew and me.

a>In message <001801be5232$f91f8ef0$0700a8c0@farpoint>, "John Barbee"
a>writes:

j>Andrew, I have gotten my X logins to show up in some form.  I think I
j>was able to get it showing up in the last log but not respond to
j>w/who/finger. I was in the middle of tracking down where in the code
j>these program were getting their information from but got distracted.  
j>I've since reinstalled and haven't gotten back to it.

a>Yeah, You run "who" using the wtmp file instead of utmp, and you'll get
a>a long list of all the folks who have been on, including your X sessions
a>(I think), but who won't read an X session entry out of the utmp file
a>(which is what it normally does).

j>Anyway, I think that with the correct sessreg config like it says in
j>http://www.freebsd.org/cgi/getmsg.cgi?fetch=137567+139561+/usr/local/www/db/
j>text/1997/freebsd-questions/19970608.freebsd-questions
j>you get stuff showing up in the last log.  However, in order for the
j>other cmds to work you need to do something else.  But I'm not sure and
j>I'm not an expert.

a>Just read it, tried it.  Works with "who /var/log/wtmp" but not with
a>just plain old "who".  The man page for sessreg complains that BSD's
a>interface to utmp is just inferior to SysV's.  The gall!

so anyway, as you we can get this far with just two tweak in xdm's config
files with sessreg.  it's doesn't depend on a user's xsessions file and
doesn't require you to play with xsessions or xlogout.

and from there it's just a slight tweak of w/who/finger to get them to
output the x sessions as well as regular terminal logins.  this is what i
meant by "added functionality" if i didn't make that clear before.  the
last time i tried to do this was a while ago and i haven't picked it up
again.  i got involved in this because andrew asked the list about it.
anyway, i understand you don't really care about this issue but i'm sure
andrew would appreciate it if you'd help him find the tweak for
finger/w/who or sessreg to log X logins in utmp and/or wtmp.

anyway, since we're in pretty close agreement what how this should work
(logging into X logs something in utmp, etc.) there's no need to take this
any further unless we feel like helping andrew with the tweaking.  i'd
like to bring this to a close.

john.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9902100823480.28204-100000>