This is something i need to implement quite urgently. My requirement is as follows:
We are using Solaris 10, Sun Access Manager appln.
we need to start a domain through script (automated). Syntax of the command goes as below:
./asadmin start-domain --user admin domain1
after this it will prompt for a password
Enter Password
I do not have any idea of passing the password in the command line. What i am trying to achieve is after it asks for password, it must be read it from a file where i have already maintained the details.
Please help me out... as I mentioned, it is something i need to test and implement on priority basis.
Thank You.
The above solution did work in stopping and starting the services when executed through scripts. But we landed into a dicey situation where in all the application services and agents are up but the application page is not openeing (front end). Not really sure if this post is in its right place..but please help.
Go with expect programming ... to pass password ..
You can use openssl file encryption and description method .
## Encrypt using openssl with password: sks and delete un-encrypted file
# openssl des3 -e -in a -out aa; rm -fr a
## varify
# cat aa
Salted__�r>��d�K��&�s ### Here's my script that read the encrypted file
# cat test.sh
IFS=$'\n'
for ln in `openssl des3 -d -in aa -out maa -pass pass:sks;cat maa; rm -fr maa`
do
echo $ln
sleep 3
done
@vipinkumarr89
Your post contains syntax errors and logic errors. Please test before you post.
Also, please look at the date on threads before replying.