<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FTP Login Session in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592006#M33018</link>
    <description>You could either extend the login period from 30 days to 90 days, or you could possibly "flag" the account as active. Is this a trusted system?</description>
    <pubDate>Tue, 09 Oct 2001 19:05:59 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2001-10-09T19:05:59Z</dc:date>
    <item>
      <title>FTP Login Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592005#M33017</link>
      <description>I am using HP-UX 10.20 on an HP 9000 K460.  My problem is I have approximately 1400 FTP/Telnet users on my system.  The users use WS-FTP to download/upload files.  Also, I have my security properties set to disable any accounts not used with 30 days.  My problem is that most of my users only FTP into the system and the system does not recognize the FTP session as a login in session.  Due to the design of the system and other issues it has to be done this way.  Any suggestion, if any, on how to get the system to recognize FTP as a login session.  Thanks...</description>
      <pubDate>Tue, 09 Oct 2001 19:02:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592005#M33017</guid>
      <dc:creator>Michael Joseph</dc:creator>
      <dc:date>2001-10-09T19:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Login Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592006#M33018</link>
      <description>You could either extend the login period from 30 days to 90 days, or you could possibly "flag" the account as active. Is this a trusted system?</description>
      <pubDate>Tue, 09 Oct 2001 19:05:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592006#M33018</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-10-09T19:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Login Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592007#M33019</link>
      <description>ftp sessions are logged in wtmp, so you could write a script that parses the output from the 'last' command and see the last time the user ftpped into the system, i.e.:&lt;BR /&gt;&lt;BR /&gt;last -R -1 &lt;USER&gt;&lt;BR /&gt;&lt;BR /&gt;will tell you when the user last accessed the system.&lt;BR /&gt;&lt;BR /&gt;-Santosh&lt;/USER&gt;</description>
      <pubDate>Tue, 09 Oct 2001 19:09:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592007#M33019</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-10-09T19:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Login Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592008#M33020</link>
      <description>You need do it manually with some scripting as the accounts are accessed only through ftp.&lt;BR /&gt;&lt;BR /&gt;1) Keep only 30 days of wtmp file. You can use&lt;BR /&gt;/usr/sbin/acct/fwtmp to resize files.&lt;BR /&gt;&lt;BR /&gt;cat var/adm/wtmp | /usr/sbin/acct/fwtmp &amp;gt; /tmp/fwtmp.ascii&lt;BR /&gt;&lt;BR /&gt;Use sed to delete the lines that are older than 30days. This is where you need to spend sometime in building a script.&lt;BR /&gt;&lt;BR /&gt;convert it back to wtmp.&lt;BR /&gt;&lt;BR /&gt;cat /tmp/fwtmp.ascii |/usr/sbin/acct/fwtmp -ic &amp;gt; /var/adm/wtmp&lt;BR /&gt;&lt;BR /&gt;This way you can maintain wtmp files for 30days.&lt;BR /&gt;&lt;BR /&gt;2. Once this is in place, your job is relatively easy. Get all the user_ids except for the standard and other required ones into a file &lt;BR /&gt;&lt;BR /&gt;egrep -v '^root|^sys|^bin' /etc/passwd|awk '{print $1}' &amp;gt; userlist   #(include other user ids that need to be there in -v args)&lt;BR /&gt;&lt;BR /&gt;last -R &amp;gt; /tmp/last.detail (this has only 30days of data)&lt;BR /&gt;for user in `cat userlist`&lt;BR /&gt;grep "^$user" /tmp/last.detail &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;if [$?! = 0 ]  #(this userdidn't ftp for the last 30days)&lt;BR /&gt;then&lt;BR /&gt;passwd -l $user  #Lock this account&lt;BR /&gt;echo "$user locked due to inactivity" &amp;gt;&amp;gt; /tmp/lock.detail&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Now do step 1 to trim the wtmp file for next day.&lt;BR /&gt;&lt;BR /&gt;This gives you only an idea. You  can develop a working script based on it.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Oct 2001 03:12:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-login-session/m-p/2592008#M33020</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-10-10T03:12:08Z</dc:date>
    </item>
  </channel>
</rss>

