LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-11-2011, 04:56 AM   #1
satya123
Member
 
Registered: Mar 2011
Posts: 31

Rep: Reputation: 0
How to display user's last login information when connected through FTP


Hi all,

I want the last login information whenever I log in through FTP.

This is possible for normal console and SSH logins by configuring in /etc/login.defs file. But I am not able to view the last login information when FTP is used.

Could anyone please help me out.

Thanks an advance
 
Old 04-11-2011, 05:18 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
I don't think this is possible with the ftp commands, available
You could however try to use the login banner, to see if it accepts variables.

Kind regards
 
Old 04-11-2011, 08:59 AM   #3
satya123
Member
 
Registered: Mar 2011
Posts: 31

Original Poster
Rep: Reputation: 0
Unhappy

Hi,

login banner is working, but i cannot find any configuration settings for enabling last login feature.
 
Old 04-11-2011, 07:17 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,329

Rep: Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364
I think the problem is that normal logins and ssh (encrypted version of login) talk direct to the OS; FTP is in fact an Application and does not store that kind of info AFAIK.

The only thing that springs to kind is possibly trying to trap FTP in PAM and calling a script, but realistically I think you're out of luck.

Note however that ftp sessions are usually logged eg /var/log/xferlog or similar, so you can check post-facto if you want.
 
Old 04-12-2011, 03:52 AM   #5
satya123
Member
 
Registered: Mar 2011
Posts: 31

Original Poster
Rep: Reputation: 0
Thank you...but the log files will not contain any information once the system goes for reboot. So I cannot get the last login information from there.

Maybe it is not possible because FTP does not interact directly with the kernel.
Thanks anyways.
 
Old 04-12-2011, 07:57 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,329

Rep: Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364Reputation: 2364
Unless you're doing something very weird, log files are NOT deleted when the system reboots....
 
  


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
Login Display not showing up on external monitor connected to laptop during startup.. navneethr Linux - Laptop and Netbook 3 02-26-2010 05:27 PM
FTP login for particular user cj_cheema Linux - Server 2 08-05-2009 10:33 AM
Prompt user for information immediately after login? bpottle Linux - Software 1 05-31-2006 09:59 AM
how can i display a information for all users when they login? lnthai2002 Linux - General 1 02-21-2006 07:04 PM
how to - ftp user with no login shell hnad Red Hat 3 04-13-2004 03:22 AM


All times are GMT -5. The time now is 10:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration