<?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: passwd file cleanup in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646522#M44977</link>
    <description>for i in `cat /etc/passwd| awk -F: '{print $1}`&lt;BR /&gt;do&lt;BR /&gt;expr=ls -la /home/kwright |awk '{print $6" "$7}'&lt;BR /&gt;if [ date  &amp;lt; $exp ];then&lt;BR /&gt;userdel $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This will give you an idea..but you need to get the MATH part right to fit your need. date could be the current date - 50 days or something.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 16 Jan 2002 18:04:35 GMT</pubDate>
    <dc:creator>Kevin Wright</dc:creator>
    <dc:date>2002-01-16T18:04:35Z</dc:date>
    <item>
      <title>passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646517#M44972</link>
      <description>How do you guys cleanup your /etc/passwd and remove users who have not logon for a long time?&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jan 2002 17:25:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646517#M44972</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2002-01-16T17:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646518#M44973</link>
      <description>vipw, or much easier is userdel.&lt;BR /&gt;see the man page for userdel.</description>
      <pubDate>Wed, 16 Jan 2002 17:28:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646518#M44973</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2002-01-16T17:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646519#M44974</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you like SAM, you can do it there.  SAM will offer you the option of removing or transfering ownership of a user's files to another.&lt;BR /&gt;&lt;BR /&gt;Remember that if you merely remove a user from /etc/passwd manually, then the user's files remain on the system.  The file's inode contains the uid even though /etc/passwd can no longer translate number-to-name.  If you have ever done this, you can look for "orphaned" files with:&lt;BR /&gt;&lt;BR /&gt;# find /home /usr /var /tmp -nouser&lt;BR /&gt;&lt;BR /&gt;...or for a specific uid:&lt;BR /&gt;&lt;BR /&gt;# find /home /usr /var /tmp -user 103&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 16 Jan 2002 17:34:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646519#M44974</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-01-16T17:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646520#M44975</link>
      <description>Do you have a script of some sort to determine a user has not been logging on for a long time?  We have well over 50+ servers here, doing it manually is a pain.&lt;BR /&gt;&lt;BR /&gt;I am using finger and has attempted to use last but I am just wondering if there is any better solution.  How can I get the atime of .sh_history?</description>
      <pubDate>Wed, 16 Jan 2002 17:41:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646520#M44975</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2002-01-16T17:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646521#M44976</link>
      <description>Another thing to check.  If you are removing an admin user and he/she was assigned a uid of 0.  Then DO NOT let sam remove his/her files.  You could wipe out everything.&lt;BR /&gt;&lt;BR /&gt;Just a gotcha&lt;BR /&gt;&lt;BR /&gt;...jcd...</description>
      <pubDate>Wed, 16 Jan 2002 17:45:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646521#M44976</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2002-01-16T17:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646522#M44977</link>
      <description>for i in `cat /etc/passwd| awk -F: '{print $1}`&lt;BR /&gt;do&lt;BR /&gt;expr=ls -la /home/kwright |awk '{print $6" "$7}'&lt;BR /&gt;if [ date  &amp;lt; $exp ];then&lt;BR /&gt;userdel $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This will give you an idea..but you need to get the MATH part right to fit your need. date could be the current date - 50 days or something.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jan 2002 18:04:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646522#M44977</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2002-01-16T18:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646523#M44978</link>
      <description>If you're running trusted, the getprpwent function (man 3 getprpwent) will give you the last successful login (see fd_slogin).&lt;BR /&gt;&lt;BR /&gt;Once you get a list of who can be removed, we use userdel (man 1m userdel) in a script to remove the users.</description>
      <pubDate>Wed, 16 Jan 2002 18:54:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646523#M44978</guid>
      <dc:creator>Christopher Caldwell</dc:creator>
      <dc:date>2002-01-16T18:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646524#M44979</link>
      <description>I have a better picture now. But unfortunately I am not running trusted.</description>
      <pubDate>Wed, 16 Jan 2002 19:19:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646524#M44979</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2002-01-16T19:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646525#M44980</link>
      <description>BTW, even if you're not running trusted, given that you can determine last login (see the last command - man last) to produce a list of inactive folks, you can still user userdel.</description>
      <pubDate>Wed, 16 Jan 2002 19:57:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646525#M44980</guid>
      <dc:creator>Christopher Caldwell</dc:creator>
      <dc:date>2002-01-16T19:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646526#M44981</link>
      <description>if you run pwchk -a, you will get a list of login ids with no home dir, or with password problems if you have tcb enabled.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Wed, 16 Jan 2002 23:31:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646526#M44981</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-01-16T23:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file cleanup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646527#M44982</link>
      <description>Since I backup my systems regularly, I am ruthless about non-users. I find $HOME directories where all the files (especially shell history) are older than 3 months. I script userdel to remove the user and related files, and as mentioned, always verify the user ID. Someone may have hacked into the system and created an ID=0 user. Trust me: you DON'T want to remove files owned by this user!&lt;BR /&gt;&lt;BR /&gt;If the user complains, that's good. Now I can find out why $HOME is not being changed. I can always restore the user once I understand the usage.</description>
      <pubDate>Thu, 17 Jan 2002 02:46:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file-cleanup/m-p/2646527#M44982</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-01-17T02:46:43Z</dc:date>
    </item>
  </channel>
</rss>

