- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to Reset passwd for some particular user
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-02-2007 09:17 AM
01-02-2007 09:17 AM
script to Reset passwd for some particular user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2007 04:24 PM
01-06-2007 04:24 PM
Re: script to Reset passwd for some particular user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2007 04:53 PM
01-06-2007 04:53 PM
Re: script to Reset passwd for some particular user
Check this out,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1087589
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2007 08:14 AM
01-07-2007 08:14 AM
Re: script to Reset passwd for some particular user
IF you are NOT on a trusted system, the encrypted passwords are in the passwd file, so you could try to edit a copy (repeat,a copy!) of the file. Quick and dirty thing I just glued together on my linux box:
for i in `cat userlist.txt`; do cat passwd.copy | sed -e "s/^\($i\):.*:\(.*:.*:.*:.*:.*$\)/\1:r4hRJr4GJ4CqE:\2/" > passwd.copy; done
--> userlist.txt contains the usernames to 'reset', one per line.
--> passwd.copy is a copy (!) of the passwd file.
--> r4hRJr4GJ4CqE is an encrypted password, obtained by changing one user's password and recording the encrypted string from the passwd file.
After running the command, all users which were in userlist.txt should have this same password entry in the passwd copy.
The command seems to do what I want on my linux box. If you want to try it, test it extensively on COPIES of the file, and check everything thoroughly.
Again, this could only work on a system which has its passwords in /etc/passwd (NOT on a trusted system).
DON'T try this blindly on your live system ! It might turn out not be a good idea just as well. Make a few test users first or something..
Oh yea, and don't hold me responsible should careless fiddling with your passwd file get you into trouble ;-)
Good luck !
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2007 03:17 PM
01-07-2007 03:17 PM
Re: script to Reset passwd for some particular user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2007 06:17 PM
01-07-2007 06:17 PM
Re: script to Reset passwd for some particular user
Care to assign some points to my answer, then ? I did spend some time on your problem, and I'm saving up for my first hat :-p
Cheers