Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command 'last' in SCO Unix Sys/V - Ver 3.2.4.2

Status
Not open for further replies.

salimwng

IS-IT--Management
Mar 11, 2002
134
MU

Recently i had to re-install our Unix system due to upgrade of Server. Since then i noticed that when i launched command 'last' on root to obtain the log for users who logged in, few pages only are displayed. That is it keeps a log for about 2 days only. Previously i could notice that the file ( /dev/wtmp) was getting bigger, now it's no more the case.

Can this file size be increased so that it can hold log info for 2 months ? Can you please show to me who this changes can be made.


Also, there are many users who uses a terminal Emulator ( e.g. Winlite / AlphaCommunicator ) to have access to the Unix system From a Win9X pc via TCP/IP. But when i type 'w' on Unix to know who are logging and what are they doing, i obtain info like ;

root ttyp1 5:37pm 3 w
bharat ttyp3 8:09am 4:08 lpr -s -dStore2
deepak ttyp6 1:31pm 6 /bin/sh -c /pegixa
laurine ttyp23 8:51am 1:12 /bin/sh -c /pegixa
laurine ttyp24 8:51am 4:35 lpr -s -dInvoice

My question is how can i know which IP address have been assigned the ttyp1 or ttyp24 ?

Thank you very much.
Salim

 
Have you checked whether there's anything in the crontab which clears down the wtmp file every couple of days? Do a crontab -l and examine the scripts which are run (or post it here and we will). Cheers.
 

No sir, i couldn't notice anything which have got a link with wtmp. But i list them below down here, it's you the expert.

17 5 * * 0 /etc/cleanup > /dev/null
0 2 * * 0,4 /usr/lib/cron/logchecker
0 3 * * * /usr/lib/cleantmp > /dev/null
1 3 * * * cat -s /dev/clock >/dev/null 2>&1 || exit 0;/etc/setclock `date +\%m\%
d\%H\%M\%y`
5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A
20 1 * * * /usr/bin/calendar -
0 0 1 * * op caltrim 30
0 0 * * 1-5 op cronsched
0 0 * * 1 op cronsched -w

Awaiting your reply,

Thank you & regards.
Salim
 
'Expert' - no not really.

I suggest having a look at what exactly the 3 files:

17 5 * * 0 /etc/cleanup > /dev/null
0 2 * * 0,4 /usr/lib/cron/logchecker
0 3 * * * /usr/lib/cleantmp > /dev/null

are doing. Check the code and see whether there's any reference to wtmp within them. They look like they're tidying up scripts to me. HTH. Sorry - bit of a rush here as I'm on holiday tomorrow!
 
To find what ip the pseudo tty is attached to use:

w -x
or
who -x

these will return the hostname if it can resolve it or the ip if it can't
 
I tried this command ;

w -c

or who -x,

none of them worked. I received illegal option --x.

However w alone works but do not give the ip address of the psudo tty.

BTW; Am using SCO Unix Sys/V - Version 3.2.4.2
 
Hey

About currently logged IP-adress, try finger. I have scounix 5.0.4 and finger gives me the following:

kprofix:klik-$ finger
Login Name Tty Idle Login Time Where
klik user1 p0 1:12 Tue Apr 9 07:05 xxx.xxx.xxx.183
klik user2 p1 20:53 Mon Apr 8 11:37 xxx.xxx.xxx.241
klik user3 p2 1:12 Tue Apr 9 07:13 xxx.xxx.xxx.183

and "where" is the IP-adress

aarne
 
Hi aarne,

Unfortunately, this command does not work under SCO Unix 3.2.4.2.

Thanks anyway.
Regards.
Salim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top