password encryption

 
SOLVED
Go to solution
tempsample
Frequent Advisor

Re: password encryption

Hi Matti,

 

 

Thanks for the suggestion.

 

I do understand your point,but i want to set the username and password to be same.

 

if i am going to create 10 users and for all 10 users username will be password.

 

from the above script,I cant't export the value for password filed that is $PASSWD.

 

to make user active i have to use salt value to password that is $PASSWD66,but i am not able to export the password filed.

 

in v3,I dont have any problem,

 

/usr/sbin/usermod -p $(perl -e"print crypt('$PASSWD','xxxxxxxx')") -F $USERNAME

 

but in v2,

 

/usr/sam/lbin/usermod.sam -p `echo $PASSWDlb | /usr/lbin/makekey` $USERNAME

 

in password filed,I have included $PASSWDlb,but in script i have exported as PASSWD,so it is not matching.

 

is there any solition to fix it ??

tempsample
Frequent Advisor

Re: password encryption

adding one more to the previous post :

 

/usr/sam/lbin/usermod.sam -p `echo ABcd1234lb | /usr/lbin/makekey` $USERNAME

 

currently i am setting ABcd1234 as password to all user,but i want to set username as password for all users .

 

 

 

 

tempsample
Frequent Advisor

Re: password encryption

Can any one has idea to crypt the password ?

 

so that I can match to my script that i posted above in previous post

tempsample
Frequent Advisor

Re: password encryption

i found the previous post posted by JRF under the subject name :Using Makekey and Usermod.sam

 

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1252591

 

but i am not able to open it.

 

Can any one help me in opening the page.

Matti_Kurkela
Honored Contributor
Solution

Re: password encryption

> /usr/sam/lbin/usermod.sam -p `echo $PASSWDlb | /usr/lbin/makekey` $USERNAME

 

The shell "thinks" you want to use the variable named PASSWDlb, not the variable named PASSWD.

 

Try this:

 

/usr/sam/lbin/usermod.sam -p `echo ${PASSWD}lb | /usr/lbin/makekey` $USERNAME

 

 

MK
Dennis Handly
Acclaimed Contributor

Re: password encryption

>I found the previous post posted by JRF under the subject name: Using Makekey and Usermod.sam

 

It helps if you provide the URL:

http://h30499.www3.hp.com/t5/System-Administration/Using-Makekey-and-Usermod-sam/td-p/4431217

 

>Can any one help me in opening the page.
 
That URL is the previous incarnation of the forums and is gone forever but the post is somewhere.
You could do a google search for JRF's posts and likely words:
makekey usermod.sam site:h30499.www3.hp.com
 
Some possible other topics: