Redhat and Who Command?
Peter Schneider (pschneid@escorp.unizh.ch)
5 Jun 1999 1920:49:06 +0100
System Administrator <admin@castle.cdsnet.com> wrote:
: Hi,
: /AutoPPP/ - - /usr/sbin/pppd login
: Does not show the user as logged in at all. Anyone have any ideas why this
: is happening?
Hi,
sorry that I don't know the answer to the problem - I can just report that
after two days of dejanews and FAQ reading I can NEVER get w to show the
actual username. I am adhering to each and every recommendation I have
seen (correct PPP options etc), so I think that users like myself are
entitled to believe that they are not stupid.
(Since the dial-in server is a bit crucial, I won't try to compile PPP
manually and spend a lot of time fiddling with it, but I am sure this is
where the problem is.)
I am using RedHat 5.2 also. In order to see who is actually on the system,
I have resorted to two simple scripts in /etc/ppp :
[pschneid@/etc/ppp]# cat auth-down
#!/bin/sh
# script to log ppp usage
logger -p local0.info -t "PPP Logout by" $2 " on " $1 $4
[pschneid@/etc/ppp]# cat auth-up
#!/bin/sh
# script to log ppp usage
logger -p local0.info -t "PPP Login by" $2 " on " $1 $4
Of course, you need to configure /etc/syslogd.conf to something like
# PPP log
local0.* /var/log/ppp.log
You can then have a look (eg with tail /var/log/ppp.log) to see the
latest logins:
Jun 5 15:42:28 xxx PPP Login by: userA on ppp0 /dev/ttyM1e
Jun 5 15:43:18 xxx PPP Logout by: userA on ppp0 /dev/ttyM1e
Jun 5 16:00:40 xxx PPP Login by: userB on ppp0 /dev/ttyM1e
Jun 5 16:10:50 xxx PPP Logout by: userB on ppp0 /dev/ttyM1e
Jun 5 19:09:32 xxx PPP Login by: userC on ppp0 /dev/ttyM1e
Jun 5 19:46:00 xxx PPP Logout by: userC on ppp0 /dev/ttyM1e
Hope this helps some of you,
Peter