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!

ppp login/logout

Status
Not open for further replies.

Bangieff

Technical User
Feb 12, 2001
52
BG
Hi all
I'm trying to write a simple user activity logging program. But Would anyone tell me what's the best way to untherstand that a user have logged in or out

Thanks
 
There are many ways to determine usage from users on a system. Your main
system logs are the easiest. The other way is to setup accounting system on box
where it creates more specialized logs of users actions, time on, time off, even
down to more detailed "things" that users would not like you to really know.

the linux system also makes available the /proc system that can be read on
timed basis or even every time the file is written too. I refer to such files
as "utmp" "wtmp" both with good documentation on usage and may be what
your after. The "who" command is one of these tools that reads the utmp file.
So I would probably look in that direction. You might find more info on it also
via the Documentation included in the kernel source.

Also each shell type available keeps a log of activity such as bash's .bash_history
file in home directories of uses if telneted in... the ftp transfer log for their ftps'
so keeping track of what a users does or more is a matter of figuring out..
what parts of users interaction you wish to log.

Maxit
 
The users have not any shell (/bin/noshell) ;) so the .shell_history file is unuseable in that case
I need to log only the standart messages that syslogd outputs for the mail (sendmail & pop3 infos) and the traffic for each user in a separate file for any user.
I found the utmp documentation and now I read but I have some problems with associated functions. I keep trying ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top