- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Setting default password on new account creati...
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
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
тАО05-12-2004 12:47 PM
тАО05-12-2004 12:47 PM
I have a need set the default password for new accounts created on HPUX. I have 10.20, 11, and 11i systems. There are a few untrusted system which I can not change at this.
I have a vendor tool implemented that connect and run comands as root. It does not handle for loops and such well, and I do not have any alternative tools that are implemented. PS I do not want to use expect for this at this time. Thanks for your replies in advance.
My questions are:
1. How do I convert the default password to its encrypted state that would be used in the trusted directory/files?
2. Also is this encrypted password compatible in non trusted systems for the password entry?
3. What is a simple/reliable way to source this password in the the password file and the users trusted file on trusted? Keeping in mind that loops are not very compatible with my tool. My guess is it will have to be along the lines of a sed substitution.
4. Are there any major differences in encryption of the password between ll.0 and lli that pose an issue?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2004 01:42 PM
тАО05-12-2004 01:42 PM
SolutionMYPASSWD=123abc
MYCRYPT=$(pw $MYPASSWD | tail -1 | awk '{print $NF}')
MYCRYPT will have the properly encrypted password entry and works on Trusted and unTrusted. It has been in use since HP-UX version 8.xx and works fine on all the revs through 11.11.
1- Use the pw program
2- yes
3- I've tried many different sed and awk soultions. Nothing beats the simplicity of usermod.sam since this is the tool that SAM uses. Here is how you do it:
/usr/sam/lbin/usermod.sam -p $MYCRYPT user_login
usermod.sam patches the correct location in place whereas sed and awk solutions require a temp file and lots of tests to make sure the task doesn't trash everything.
4- None. The crypt call is how passwords are encrypted. There is a special consideration for Trusted systems: you are no longer limited to 8 significant characters in a password. Now since you are generating a default or standard password, this is no issue. Just make the default password = 8 characters.
As far as connecting and running commands, I use root 'helper' scripts to accomplish special tasks on the remote systems. I distribute these special commands with a batch ftp script so that all of them can be updated in less than a minute. An example is a userinfo script that runs on 10 and 11, Trusted and unTrusted and returns detailed info about the state of the user's account.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2004 07:42 PM
тАО05-12-2004 07:42 PM
Re: Setting default password on new account creations
That was an excellent answer Bill. You do not happen to have an example of the userinfo script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2004 08:56 PM
тАО05-12-2004 08:56 PM
Re: Setting default password on new account creations
It uses /usr/lbin/makekey to perform the encryption and /usr/sam/lbin/usermod.sam -p to apply the crypted password
Gareth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2004 01:16 AM
тАО05-13-2004 01:16 AM
Re: Setting default password on new account creations
DEBUG=1 userinfo billh
Fairly useful to look at disabled accounts or other details. Works on 10.xx and up, Trusted and unTrusted.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2004 06:20 PM
тАО05-17-2004 06:20 PM
Re: Setting default password on new account creations
I like your idea Gareth, but I am having problems with the encrypted password it is generating. I am using the script as it is designed. The syntax I am using is:
./script username thepassword az
When I plug it in on untrusted I get an invalid sorry.
When I plug it in on trusted it accepts the password and says it is expired although getprpw is returning alock and all 0s.
Many thanks,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2004 08:55 PM
тАО05-17-2004 08:55 PM
Re: Setting default password on new account creations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2004 12:16 AM
тАО05-18-2004 12:16 AM
Re: Setting default password on new account creations
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2004 02:38 AM
тАО05-18-2004 02:38 AM
Re: Setting default password on new account creations
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2004 03:00 AM
тАО05-18-2004 03:00 AM
Re: Setting default password on new account creations
Another idea is to use "/usr/lib/makekey" to generate the encrypted passwords for you. One caveat with this program is that the input strings has to be exactly 10 chars. First 8 chars being the actual password and the last two is "salt", arbitrary chars. This should work for your need as you are trying to setup a default password initially. If you have a password that's less than 8 chars, then substitute the rest with null characters. For ex.,
$echo "Test1234xy|/usr/lib/makekey"
xyyB13z8Nr6jw
$echo "Test12\0\0xy| /usr/lib/makekey"
xyCFvTRIXUTVA
If you want better passwords, you can write a simple program using "bigcrypt" function.
I agree with the previous postings that there isn't a better tool than /usr/sam/lbin/usermod.sam to embed the encrypted passwords into password registry.
-Sri