如何确定何时用户的帐户将被locking在HP-UX中

我试图弄清楚如何确定HP-UX服务器上的用户帐户何时被locking。 我需要这个服务器上的每个用户。

在其他types的UNIX中,这种types通常在/ etc / shadow文件中作为每行的第8个字段(自1970年1月1日以来帐户被禁用时的天数)中find。

从我一直在读的,这将做到这一点:

/usr/lbin/getprpw -r -m acctexp <username> 

http://www.hpuxtips.es/?q=node/157

http://fixunix.com/security/74478-scripts-needed-trusted-hp-ux-system.html

在HP-UX上是一样的,/ etc / shadow中的第8个字段告诉你:

(从HP-UX 11.31上的man shadow

 expiration The absolute number of days since Jan 1, 1970 after which the account is no longer valid. A value of zero in this field indicates that the account is locked. 

此外,应该注意的是,如果一个帐户由于过多的validation尝试而被locking,您将不会在/ etc / shadow中看到该帐户。 你可以找出login失败的login数

 userdbget -u username auth_failures 

并testing它是否大于/ etc / default / security中定义的AUTH_MAXTRIES的值。