- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Account expiration in trusted systems !!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2007 07:27 AM
тАО08-08-2007 07:27 AM
Which exact lock-out value below says the account is EXPIRED..
> /usr/lbin/getprpw abcd
uid=8175, bootpw=NO, audid=221, audflg=1, mintm=-1, maxpwln=-1, exptm=-1, lftm=-1, spwchg=Tue Jul 24 10:51:34 2007, upwchg=Mon Jul 3 15:45:54 2006, acctexp=-1, llog=-1, expwarn=-1, usrpick=DFT, syspnpw=DFT, rstrpw=DFT, nullpw=DFT, admnum=-1, syschpw=DFT, sysltpw=DFT, timeod=-1, slogint=Wed Aug 8 15:04:14 2007, ulogint=Mon Jul 23 02:06:29 2007, sloginy=tty, culogin=-1, uloginy=-1, umaxlntr=-1, alock=NO, lockout=0000000
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2007 07:36 AM
тАО08-08-2007 07:36 AM
Re: Account expiration in trusted systems !!
A '1' in position 1 would indicate the password is beyond its lifetime.
A '1' in position 2 would indicate that a password is beyond the last login time (ie an inactive account).
A '1' in position 3 would indicate that a password is beyond its absolute lifetime.
A '1' in position 4 would indicate too many failed attempts.
A '1' in position 5 would indicate a password is required but the current password is null.
A '1' in position 6 would indicate that the account has been locked by root.
A '1' in position 7 indicates that the password hash is '*'.
You should note that any or all of these could be true simultaneously.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2007 07:37 AM
тАО08-08-2007 07:37 AM
Re: Account expiration in trusted systems !!
hope it helps
lockout returns the reason for a lockout in a "bit" valued
string, where 0 = condition not present, 1 is
present. The position, left to right represents:
1 past password lifetime
2 past last login time (inactive account)
3 past absolute account lifetime >**This is the answer****<
4 exceeded unsuccessful login attempts
5 password required and a null password
6 admin lock
7 password is a *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2007 07:40 AM
тАО08-08-2007 07:40 AM
Re: Account expiration in trusted systems !!
-- WH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2007 08:08 AM
тАО08-08-2007 08:08 AM
Solution-----------------------------------------
#!/usr/bin/sh
typeset U=""
typeset L=""
typeset -i STAT=0
logins | awk '{print $1}' | \
sort | while read U
do
L=$(/usr/lbin/getprpw -r -m lockout ${U})
STAT=${?}
if [[ ${STAT} -eq 0 ]]
then
echo "${L}" | grep -E -q -e '^1' -e '^.1' -e '^..1'
STAT=${?}
if [[ ${STAT} -eq 0 ]]
then
echo "User ${U} expired"
fi
else
echo "getprpw failed for user ${U}; status ${STAT}." >&2
fi
done