<?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: fields in TCB in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654175#M240963</link>
    <description>Sorry,&lt;BR /&gt;I was too hasty to quickly cut'N'paste the code snippet from my utility collection. This code is actually a part of a multi OS trusted system handling code, i.e., spaghetti code.&lt;BR /&gt;&lt;BR /&gt;I have tested the following code on one of my systems and it is working for me right now. Hope it works for you too.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for ID in `cat /etc/passwd | cut -d: -f1`&lt;BR /&gt;do&lt;BR /&gt;STATUS=$(/usr/lbin/getprpw -l -r -m lockout $ID)&lt;BR /&gt;RC=$?&lt;BR /&gt;&lt;BR /&gt;if [ $RC -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt;case "$STATUS" in&lt;BR /&gt;0000000 ) print "Account Active." ;;&lt;BR /&gt;1?????? ) print "LOCKED: Past password lifetime." ;;&lt;BR /&gt;?1????? ) print "LOCKED: Past inactive time." ;;&lt;BR /&gt;??1???? ) print "LOCKED: Past account lifetime." ;;&lt;BR /&gt;???1??? ) print "LOCKED: too many failed logins." ;;&lt;BR /&gt;????1?? ) print "LOCKED: passwd required." ;;&lt;BR /&gt;?????1? ) print "LOCKED: Locked by Admin." ;;&lt;BR /&gt;??????1 ) print "LOCKED: Password is a *." ;;&lt;BR /&gt;* ) print "Unknown status code returned.";exit 10;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;else&lt;BR /&gt;&lt;BR /&gt;echo "There is a problem running getprpw command."; exit 11&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;</description>
    <pubDate>Fri, 21 Oct 2005 10:08:48 GMT</pubDate>
    <dc:creator>Mel Burslan</dc:creator>
    <dc:date>2005-10-21T10:08:48Z</dc:date>
    <item>
      <title>fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654167#M240955</link>
      <description>is there a field under a user-id, under /tcb/files/auth/letter/name  that indicate that user-id is currently disabled? Trying to find a quick way to see what users on my system (HPUX 11.i) are in a disabled state.  thanks</description>
      <pubDate>Thu, 20 Oct 2005 14:20:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654167#M240955</guid>
      <dc:creator>Mark Harshman_1</dc:creator>
      <dc:date>2005-10-20T14:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654168#M240956</link>
      <description>the man page for getprpw contains the info you'll need. I don't have a trusted system to check my syntax, but looks like '/usr/lbin/getprpw -m lockout username' is what you'd want to use in your script. Compare the output of what lockout returns to the entry you see in the /tcb/auth/letter/username file. &lt;BR /&gt;&lt;BR /&gt;The values for lockout are explained in the man page... basically anything other tan all zero's means the account is disabled.&lt;BR /&gt;&lt;BR /&gt;examples...&lt;BR /&gt;0000010 means admin lock&lt;BR /&gt;0001000 means too many failed attempts&lt;BR /&gt;&lt;BR /&gt;hope this helps,&lt;BR /&gt;-denver</description>
      <pubDate>Thu, 20 Oct 2005 14:32:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654168#M240956</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2005-10-20T14:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654169#M240957</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You may write a script to get the required info.&lt;BR /&gt;&lt;BR /&gt;see the lockout=0000000 part from the /usr/lbin/getprpw &lt;USER_NAME&gt; output. If the lockout value is 0000000 then the account is enabled. All the other conditions shows a kind of lockouts.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;here are some inputs to make the script.&lt;BR /&gt;&lt;BR /&gt;get the user list in to a tmp file by&lt;BR /&gt;&lt;BR /&gt;cat /etc/passwd | cut -d: -f1 &amp;gt; /tmp/userlist&lt;BR /&gt;&lt;BR /&gt;read the users one by one form this file and check the lockout status and the ouput of the same can be stored in a file along with the username.&lt;BR /&gt;&lt;BR /&gt;Now do a &lt;BR /&gt;&lt;BR /&gt;grep -v 0000000 &amp;lt; file name &amp;gt;&lt;BR /&gt;&lt;BR /&gt;to find out the locked users in the system.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam&lt;BR /&gt;&lt;/USER_NAME&gt;</description>
      <pubDate>Thu, 20 Oct 2005 14:42:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654169#M240957</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-10-20T14:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654170#M240958</link>
      <description>getprpw on my "andyt" login:&lt;BR /&gt;&lt;BR /&gt;# /usr/lbin/getprpw -m lockout andyt&lt;BR /&gt;lockout=0000000&lt;BR /&gt;&lt;BR /&gt;From the man page of getprpw:&lt;BR /&gt;&lt;BR /&gt;"lockout=#######"        returns the reason for a lockout in a "bit" valued&lt;BR /&gt;                          string, where 0 = condition not present, 1 is&lt;BR /&gt;                          present.  The position, left to right represents:&lt;BR /&gt;&lt;BR /&gt;                          1 past password lifetime&lt;BR /&gt;                          2 past last login time (inactive account)&lt;BR /&gt;                          3 past absolute account lifetime&lt;BR /&gt;                          4 exceeded unsuccessful login attempts&lt;BR /&gt;                          5 password required and a null password&lt;BR /&gt;                          6 admin lock&lt;BR /&gt;                          7 password is a *&lt;BR /&gt;&lt;BR /&gt;Throw all that into a script and you'll be able to cull all the locked out users.</description>
      <pubDate>Thu, 20 Oct 2005 14:46:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654170#M240958</guid>
      <dc:creator>Andy Torres</dc:creator>
      <dc:date>2005-10-20T14:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654171#M240959</link>
      <description>thanks to all..useful info.</description>
      <pubDate>Thu, 20 Oct 2005 15:50:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654171#M240959</guid>
      <dc:creator>Mark Harshman_1</dc:creator>
      <dc:date>2005-10-20T15:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654172#M240960</link>
      <description>as far as I know, there is no visual way of telling who is locked and who is not but the following code snippet can help you.&lt;BR /&gt;&lt;BR /&gt;for ID in `cat /etc/passwd | cut -d: -f1`&lt;BR /&gt;do&lt;BR /&gt;STATUS=$(/usr/lbin/getprpw -l -r -m lockout $ID)&lt;BR /&gt;                RC=$?&lt;BR /&gt;                case "$RC" in&lt;BR /&gt;                   0 ) case "$STATUS" in&lt;BR /&gt;                         0000000 ) print "Account Active."                     ;;&lt;BR /&gt;                         1?????? ) print "LOCKED: Past password lifetime."     ;;&lt;BR /&gt;                         ?1????? ) print "LOCKED: Past inactive time."         ;;&lt;BR /&gt;                         ??1???? ) print "LOCKED: Past account lifetime."      ;;&lt;BR /&gt;                         ???1??? ) print "LOCKED: too many failed logins."     ;;&lt;BR /&gt;                         ????1?? ) print "LOCKED: passwd required."            ;;&lt;BR /&gt;                         ?????1? ) print "LOCKED: Locked by Admin."            ;;&lt;BR /&gt;                         ??????1 ) print "LOCKED: Password is a *."            ;;&lt;BR /&gt;                         *       ) print "Unknown status code returned.";exit 10;;&lt;BR /&gt;                       esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;hope this helps...</description>
      <pubDate>Thu, 20 Oct 2005 15:53:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654172#M240960</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-10-20T15:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654173#M240961</link>
      <description>Mel, thanks for the script. If you get this msg, its not quite workin as written.  Getting a msg that the "done" statement is not expected.  Any help would be appreciated. thanks&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Oct 2005 09:48:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654173#M240961</guid>
      <dc:creator>Mark Harshman_1</dc:creator>
      <dc:date>2005-10-21T09:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654174#M240962</link>
      <description>Use this script.. this will help you a lot&lt;BR /&gt;&lt;BR /&gt;Hanwant</description>
      <pubDate>Fri, 21 Oct 2005 10:00:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654174#M240962</guid>
      <dc:creator>Hanwant Verma_1</dc:creator>
      <dc:date>2005-10-21T10:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: fields in TCB</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654175#M240963</link>
      <description>Sorry,&lt;BR /&gt;I was too hasty to quickly cut'N'paste the code snippet from my utility collection. This code is actually a part of a multi OS trusted system handling code, i.e., spaghetti code.&lt;BR /&gt;&lt;BR /&gt;I have tested the following code on one of my systems and it is working for me right now. Hope it works for you too.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for ID in `cat /etc/passwd | cut -d: -f1`&lt;BR /&gt;do&lt;BR /&gt;STATUS=$(/usr/lbin/getprpw -l -r -m lockout $ID)&lt;BR /&gt;RC=$?&lt;BR /&gt;&lt;BR /&gt;if [ $RC -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt;case "$STATUS" in&lt;BR /&gt;0000000 ) print "Account Active." ;;&lt;BR /&gt;1?????? ) print "LOCKED: Past password lifetime." ;;&lt;BR /&gt;?1????? ) print "LOCKED: Past inactive time." ;;&lt;BR /&gt;??1???? ) print "LOCKED: Past account lifetime." ;;&lt;BR /&gt;???1??? ) print "LOCKED: too many failed logins." ;;&lt;BR /&gt;????1?? ) print "LOCKED: passwd required." ;;&lt;BR /&gt;?????1? ) print "LOCKED: Locked by Admin." ;;&lt;BR /&gt;??????1 ) print "LOCKED: Password is a *." ;;&lt;BR /&gt;* ) print "Unknown status code returned.";exit 10;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;else&lt;BR /&gt;&lt;BR /&gt;echo "There is a problem running getprpw command."; exit 11&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Oct 2005 10:08:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fields-in-tcb/m-p/3654175#M240963</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-10-21T10:08:48Z</dc:date>
    </item>
  </channel>
</rss>

