LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 03-13-2009, 10:40 AM   #1
yitbos
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Sftp login does not write to /var/log/wtmp


I have a script on my apache box that locks out users that dont login within 60 days. It has always worked just fine but we recently switched to using sftp. Unfortunately sftp does not write an entry to /var/log/wtmp when the user authenticates, so when i run the last command, they dont show up.

How do I handle this situation assuming I am unable to move away from sftp? Is there a way to add something in Pam to make sftp write to var/log/wtmp?

Thanks in advance.
 
Old 03-14-2009, 09:42 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Sftp is a SSH subsystem. While SSH can make use of PAM doubt sftp can be made to. OTOH prior to using sftp a succesful logon with SSH is required. If you would grep the logs for the "sftp subsystem" message then within a range of -A5 or so you should find the users SSH login to correlate with.
 
Old 03-25-2009, 04:24 PM   #3
yitbos
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Unspawn, thank you for the response. I'll try hacking a script together and I'll post what I come up with.
 
  


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
/var/log/wtmp mrant Linux - Security 4 07-14-2013 09:41 PM
/var/log/wtmp Permissions berzerked Red Hat 3 10-05-2011 03:49 PM
/var/log/wtmp ??? fatrandy13 Linux - Software 3 12-13-2004 10:07 AM
/var/log/wtmp praveenv Linux - Newbie 5 08-23-2004 03:48 PM
wierd characters in /var/log/wtmp mindfestival Linux - Newbie 2 04-22-2004 02:02 AM


All times are GMT -5. The time now is 04:56 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