- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- change u_pwd on trusted system using sed
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
01-14-2005 06:23 AM
01-14-2005 06:23 AM
/usr/sam/lbin/usermod.sam seems to be the preferred method, but I can't use this since it requires that the user not be logged on (which sometimes they will be).
A post I found mentioned that it is possible to use sed to change everything between ":pwd=" and the following ":" to another string, but the sed syntax was not posted.
If I have something like:
:u_pwd=qja75J6s6rdu23v1FSp.e9HI:u_auditid#14:\
How could I change the u_pwd field to the encrypted password passed into the script?
TIA,
Scott Lindstrom
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 06:30 AM
01-14-2005 06:30 AM
SolutionTry Christian's suggestion.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=68115
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 06:35 AM
01-14-2005 06:35 AM
Re: change u_pwd on trusted system using sed
I was hoping to be able to change the encrypted password field without needing to know what the old encrypted password was.
(If someone can help me extract out the old password from between 'u_pwd=' and the next ':', then I can make the suggestion listed work).
But I would hope there would be a way to change it without knowing (or caring).
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 06:45 AM
01-14-2005 06:45 AM
Re: change u_pwd on trusted system using sed
Looks like I misread the response you referred to. Let me look deeper!
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 07:27 AM
01-14-2005 07:27 AM
Re: change u_pwd on trusted system using sed
initial_char=`echo $user | awk '{print substr($1,1,1)}'`
cp /tcb/files/auth/$initial_char/$user /tcb/files/auth/$initial_char/$user.bak
sed -e 's/:u_pwd=.*:/:u_pwd='"$newpass"':/' /tcb/files/auth/$initial_char/$user.bak
Thanks!