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

How to Audit Logins and access to some important files ?

Status
Not open for further replies.

semsem1234

Technical User
May 31, 2004
9
0
0
EG
Hi everybody,

I asking about How to Audit Logins to the system , and the access to some important files ?

Thanks in Advance.

Samir.
 
The simplest way to audit logins is to add to /etc/profile

echo $LOGNAME logged in at `date "+%Y/%m/%d %H:%M"` >> /var/log/login.log

It's not very secure (anyone can delete the log)
Alternatively
echo $LOGNAME logged in at `date "+%Y/%m/%d %H:%M"` | mail mailbox@mailserver
 
You could also use the "last" command.

This command will parse the contents of the /var/adm/wtmp file, to provide you with a login history for the system.

File auditing can be enabled by configuring the audit facility. (Use "man audit" for info on this process).

For further info on configuring auditing you could look at
"Setting up Auditing" at
____________________
Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debuging Mondays code.
 
Thanks Columb & d3vzero,
I ll test them.

samir
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top