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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

last command shows only current days logins

Status
Not open for further replies.

elemica

MIS
Jan 14, 2002
48
0
0
Hi all

last command displays only current dates logins. The server is set up identical to many other servers where last command displays all prevoius logins.

Ideas on what could be causing this welcome.

TIA

 
Your [tt]/var/adm/wtmpx[/tt] file is probably being reset every night by a cron job. Check the crontab files of [tt]adm[/tt], [tt]sys[/tt], and [tt]root[/tt] for something that resets it.

Hope this helps.
 
Thanks for the response , roots cron shows

10 3 * * * /usr/sbin/logadm
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean

which is same as in the other servers.


 
What about the cron jobs for the user [tt]adm[/tt]?

Also, what's in the directory [tt]/var/adm[/tt]? Is there more than one copy of [tt]wtmpx[/tt]?
 
Make sure that there is a file /var/adm/loginlog if not create it and enable it with touch /var/adm/loginlog
chmod 600 /var/adm/loginlog

Thanks

CA
 
Actually I do not think my last response is exactly what you are looking for sorry.

can you check to see if you have a file called lastlog under /var/adm for me?

Thanks

CA
 
Thanks for the responses

There is a lastlogin file in /var/adm

-rw------- 1 root sys 0 May 26 10:03 /var/adm/loginlog

However there is no wmtpx in /var/adm but wmtp

-rw-rw-r-- 1 adm adm 0 Sep 1 10:11 wtmp

 
What version of Solaris are you running? Do a "[tt]uname -a[/tt]" and post the output.

Also, does the userid [tt]adm[/tt] have any cron entries?
 
SunOS tsemsr01 5.9 Generic_118558-06 sun4u sparc SUNW,Sun-Fire-V240

adm's cron

0 * * * * /usr/lib/acct/ckpacct
30 2 * * * /usr/lib/acct/runacct 2> /var/adm/acct/nite/fd2log
30 7 1 * * /usr/lib/acct/monacct

Thanks



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top