LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2006, 02:04 AM   #1
sanjay2004
Member
 
Registered: Dec 2004
Location: BIJAPUR
Posts: 86

Rep: Reputation: 15
need to create log file


hai,

in my linux 9.0 system

need to know frequently logged user through
SSH & FPT


i can user last command to see login
but that need to store

pl give me solN

need to store the log file in client win98
 
Old 02-27-2006, 02:20 AM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
You can parse auth.log and search for all ssh logins. For FTP, what FTP program do you use? There should be an option that indicates where the log file (if it is enabled) is written to.

To shove it to a win98 box, run some kind of ftp server on it and have a shell script on your linux box that uploads the logs to it.

-twantrd
 
Old 02-27-2006, 02:31 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Maybe your Win 98 box can share the folder where the logs are supposed to go to.
Linux can then use Samba client to mount (use the command "smbmount") the folder on your Linux box.
A simple cp/mv will suffice in that case.

But I'd go for the ftp solution too, since it may be more reliable.
 
Old 02-27-2006, 04:45 AM   #4
sanjay2004
Member
 
Registered: Dec 2004
Location: BIJAPUR
Posts: 86

Original Poster
Rep: Reputation: 15
command to create log file

hai.

I don't know the command to create log file in specified directory.

need to create log files for ssh & vsftpd user.


yes U r, I am using ftp script for copying the files into my win98 client because we have VSAT VPN system to diffirent server.

w waiting for the sug'n

Last edited by sanjay2004; 02-27-2006 at 04:48 AM.
 
Old 02-27-2006, 05:46 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
To store the results of the "last" command, just add '> some_file' or '>> some_file' at the end of the command,
where some_file must of course be replaced by the path to and filename of the actual logfile.
The options to be used for the "last" command, you can figure out yourself by reading
Code:
man last
For instance, save last 10 logins:
Code:
last -10 > /tmp/log_of_10_last_logins
Run this automatically via cron, to update the file at regular times (ie run the command once per day, once per hour, etc).
Use '>>' instead of '>' for appending to the file rather than overwriting the file each time, if you need that.

Your FTP script can then pick up the log (/tmp/log_of_10_last_logins in the example) and put it on your Win 98 computer.
 
Old 02-27-2006, 05:56 AM   #6
sanjay2004
Member
 
Registered: Dec 2004
Location: BIJAPUR
Posts: 86

Original Poster
Rep: Reputation: 15
& what abt ftp user log file?

thank u timmeke,

also pl tell me for logged ftp user,
command to check

sanjay
 
Old 02-27-2006, 11:11 AM   #7
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Have you checked your vsftpd config file to see what the 'log file' option is? For mine, it looks like this:

xferlog_file=/var/log/vsftpd.log

Once you find your log file, you will now know who is logging via FTP.

-twantrd
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create log file from script fotoguy Programming 12 03-27-2012 06:39 AM
Script to create a log file satimis Programming 15 01-16-2006 06:39 AM
How to control log file size in /var/log? yan Linux - General 2 10-13-2003 05:00 PM
what log file generator that support squid log? heero82 Linux - Software 2 07-11-2003 08:52 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration