- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script to batch change user passwd on HPUX11
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
07-10-2002 08:20 PM
07-10-2002 08:20 PM
Script to batch change user passwd on HPUX11
I want to batch change users password on HPUX via script,
Does there any command or script to auto input for
Changing password for username
New password:
Re-enter new password:
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 10:15 PM
07-10-2002 10:15 PM
Re: Script to batch change user passwd on HPUX11
No, you can not do that in a script ... unless you use a tool like expect.
See http://hpux.cs.utah.edu/ to find this software.
Regards,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 02:14 AM
07-11-2002 02:14 AM
Re: Script to batch change user passwd on HPUX11
http://forums.itrc.hp.com/cm/UserProfile/1,,CA714030!1,00.html
but that has no user name.
User "CA714030",
Please try to fix your profile. If you can not, then contact me (frank_slootweg@hp.com) with details and I will try to get the right people involved.
[Please no points (or "N/A") for *this* response.]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 10:40 PM
07-11-2002 10:40 PM
Re: Script to batch change user passwd on HPUX11
Its a bit easier when you have a trusted system, in that each user has his own passwd file. Same story, get the encrypted version of the password out of the file of the user where you manually changed it, and then paste that into the password files of the users you want to change it to.
The encypted password can also be copied to other systems, as it doesnt look like the hostname makes up part of the decryption.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 01:46 AM
07-12-2002 01:46 AM
Re: Script to batch change user passwd on HPUX11
It sounds a bit of a security risk to have the same password for many logins ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 04:43 AM
07-12-2002 04:43 AM
Re: Script to batch change user passwd on HPUX11
Are you using just normal passwords?
If both are yes, you could try this....
Search through the forums for encrypt.c and/or encrypt.pl. The purpose of this program is to return the encrypted version of the plain text password.
Copy the password file to a secure server.
Make another copy with JUST the lines you want to modify.
Cycle through each line replace the second field (ie password), with a newly generated password.
I had to add 4000 users to a text file in this way. And I did not want to do it by hand. So I made a password "factory" instead.
I had an import file with just "username password" in it (one user per line).
I compiled encrypt.c and renamed the new program "pw".
I ran....
exec 3
do
user=`echo $LINE | awk '// { print $1 }'`
pass=`echo $LINE | awk '// { print $2 }'`
pass2=`./pw $pass | awk -F: '// {pirnt $2}'`
echo "${user}:${pass2}"
done
Steve