LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 09: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, 08:42 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 03: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



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

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

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