- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Old version - reset / re-enable passwords
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
Forums
Discussions
Discussions
Discussions
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
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-11-2006 02:56 AM
08-11-2006 02:56 AM
Old version - reset / re-enable passwords
HP-UX mimed B.10.20 U 9000/800 143460532 unlimited-user
My problem. some of the users' passwords have expired, and I cannot find a way on Google to re-enable them. I did a man on passwd, but on this version there are not many options to choose from.
Any tips would be greatly appreciated.
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2006 03:05 AM
08-11-2006 03:05 AM
Re: Old version - reset / re-enable passwords
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2006 03:08 AM
08-11-2006 03:08 AM
Re: Old version - reset / re-enable passwords
# /usr/lbin/modprpw -k
to enable users.
You can also do this through SAM
# sam
Go to 'Accounts for Users and Group' then 'Users'
You will now see a list of users. Scroll down, with arrow keys, to the user you need to modify, highlight it by pressing the space bar. Then press the TAB key to activate the top menu, go over to Actions and under the Actions menu go down to REACTIVATE.
That will reactivate the user.
If you need to change their password, make sure the user is still highlighted, go back to ACTIONS and to down to MODIFY USERS PASSWORD or RESET USERS PASSWORD.
Good luck in the HP-UX world.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2006 03:10 AM
08-11-2006 03:10 AM
Re: Old version - reset / re-enable passwords
You could also choose to execute passwd -f user to expire each account so that a new password would be required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2006 03:35 AM
08-11-2006 03:35 AM
Re: Old version - reset / re-enable passwords
I also do not have many file in /tcb - only 1 directory, with another directory underneath it.
I will try the modprpw command next time. I basically just need to re-enable the account, with it's previous password for now.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2006 08:14 AM
08-11-2006 08:14 AM
Re: Old version - reset / re-enable passwords
What we whould do is loop through all the logins and use "getprpw -m lockout user" to extract the lockout value. This is a 7 character pseudo-tcb-field with a '0' (unlocked) or a '1' (locked) and the position of each digit is significant.
1 - past password lifetime
2 - past last login time
3 - past absolute account lifetime
4 - too many failed attempts
5 - null password found
6 - locked by admin
7 - password is a *
What you should do is first see if there is a "1" in any of the 1st 4 positions AND also that positions 5-7 are "0" -- this would indicate that the account is locked but not for any administrative reason. If it passes both those tests then we should call modprpw -k user to unlock the account.
This should be very close:
#!/usr/bin/sh
typeset U=""
typeset -i STAT=0
logins | awk '{print $1}' | while read U
do
typeset LCK=""
echo "User: ${U} \c"
LCK=$(/usr/lbin/getprpw -m lockout ${U} 2>/dev/null)
STAT=${?}
if [ ${STAT} -eq 0 ]
then
typeset X1=""
typeset X2=""
echo "${LCK} \c"
X1=$(echo "${LCK}" | cut -c 9-12)
if [ "${X1}" != "0000" ]
then # found a 1 in 1-4
X2=$(echo "${LCK}" | cut -c 13-)
if [ "${X2}" = "000" ]
then # 5-7 all 0
echo "Yes \c"
# /usr/lbin/modprpw -k ${U}
STAT=${?}
fi
fi
fi
echo
done
exit ${STAT}
---------------------------------
Note that I have the modprpw -k command commented out. I would run it like this until you are satisfied and then comment the 'echo "Yes \c"' and uncomment the modprpw.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2006 08:01 PM
08-13-2006 08:01 PM