To cleanup the root entries in lastlog


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting To cleanup the root entries in lastlog
# 1  
Old 05-04-2013
To cleanup the root entries in lastlog

Hi Folks,

Is there a way to cleanup the root entries in the Linux server from the lastlog.
For AIX and SUN server, this has been done Via the fwtmp command.
# 2  
Old 06-13-2013
if you mean wtmp, you can:
Code:
echo "" > /var/log/wtmp

or
Code:
cat /dev/null > /var/log/wtmp

or
Code:
cp /dev/null /var/log/wtmp


if fails, run this:
Code:
/usr/lib/acct/wtmpfix


Last edited by Franklin52; 06-13-2013 at 10:21 AM.. Reason: Please use code tags for data en code samples
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Cleanup special files create via device match in a whole root zone

I added in the configuration file of a whole root zone the following device match entries: <device match="/dev/rmt/*"/> <device match="/dev/sg/*"/> after the reboot the zone was able to see all the devices of its global zone, and let under /dev/rmt and /dev/sg the special files created with... (1 Reply)
Discussion started by: hugo_perez
1 Replies

2. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

3. UNIX for Dummies Questions & Answers

Lastlog output help

what does the filed +0100 +0000 actually indicates abcd pts/30 pdd10264 Fri Sep 2 11:06:51 +0100 2011 robo pts/5 pdd10280 Mon Feb 13 16:32:45 +0000 2012 (4 Replies)
Discussion started by: robo
4 Replies

4. AIX

lastlog

There is also "host_last_login" information in a file /etc/security/lastlog . If I login to an appl (on AIX) via 'rexec' from my pc, I can see there pc's name or its IP: tty_last_login = rexec host_last_login = 10.50.38.74 I already collect login time/date/user into my own log... (1 Reply)
Discussion started by: frajer
1 Replies

5. AIX

clear/delete log from 'last' or 'lastlog' command

Dear Friends , From 'last' or 'lastlog' command , I can get the last login informations of the users . now as a system admin , If I want to delete the log information from this 'last' 'lastog' command , then is it possible to do ? plz inform ... ... (1 Reply)
Discussion started by: shipon_97
1 Replies

6. UNIX for Dummies Questions & Answers

Lastlog and launched process

Hello there, I "discovered" an interesting command lastlog, but I couldn't find, until now:cool:, if it's possible to get a list of the launched process by users and root during a certain of time... ...any idea would be really appreciated!!! Thanks in advance. Giordano Bruno (3 Replies)
Discussion started by: Giordano Bruno
3 Replies

7. Shell Programming and Scripting

Cleanup script

Hi! I would like to write a script which remove some files, all beginning with the same prefix : prefix.1 doc/prefix.2 ../prefix.3 etc. So, I would create a file and chmod it executable. But I dont know how to pass a variable to a script. I would like to write something like ... (2 Replies)
Discussion started by: tipi
2 Replies

8. Shell Programming and Scripting

Help with cleanup

I am trying to add a unique string to a variable to prevent some name space collisions. DATAFILE=/u001/app/unica/affinium644/campaign/partitions/limited/tmp/ebf9aaah.t~# DATETIME=`date +%Y%m%d_%H%M%S` echo $DATAFILE > tmpnme.txt sed 's_/_ _g' tmpnme.txt > tmpnme2.txt DATA=$(cat tmpnme2.txt)... (2 Replies)
Discussion started by: whdr02
2 Replies

9. AIX

lastlog has duplicates

Hello, we are running AIX 4.3.3, has anyone experienced an issue with the lastlog file where there are duplicate entries. ie. # mkpasswd -c #mkpasswd -c /etc/security/lastlog ---> /etc/security/lastlog.idx 3004-779 Duplicate key found. "userazs" 3004-778 Index operation failed.... (1 Reply)
Discussion started by: chlawren
1 Replies

10. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies
Login or Register to Ask a Question