Append password on script when restarting web instance


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Append password on script when restarting web instance
# 1  
Old 05-10-2011
Append password on script when restarting web instance

im writing a start/stop script for a web instance (solaris) .
Currently I usually start it using the command below and it will ask me to put the token password for the web_instance. (token pw: 12345)

Code:
/opt/SUNWwbsvr/https-www.myhost.com/start

I would like to create a script that will execute the above command withougt entering the token pw. The user will have sudo priviledge though. Pls help.

Last edited by vbe; 05-10-2011 at 05:36 AM.. Reason: code tags: You code should be inserted between the code tags
# 2  
Old 05-11-2011
Since you'd need to store the password in cleartext (if this script is even possible), it's better just to remove the password that is probably in your ssl key than to leave a password in clear text. Back up encrypted.key
Code:
openssl rsa -in encrypted.key -out unencrypted.key

Then point to the unencrypted.key, or move it to encrypted.key (or what is appropriate to your installation). This will effectively make it so you don't have to put in the password on launch, which is what you want anyway. Protecting a key, then putting the password in the script to launch it is a bit backwards anyway.
# 3  
Old 05-12-2011
we would like to stay the pw instead of decrypting it.would you know how to store it in clear text?
# 4  
Old 05-16-2011
Quote:
Originally Posted by kalak
Since you'd need to store the password in cleartext (if this script is even possible), it's better just to remove the password that is probably in your ssl key than to leave a password in clear text. Back up encrypted.key
Code:
openssl rsa -in encrypted.key -out unencrypted.key

Then point to the unencrypted.key, or move it to encrypted.key (or what is appropriate to your installation). This will effectively make it so you don't have to put in the password on launch, which is what you want anyway. Protecting a key, then putting the password in the script to launch it is a bit backwards anyway.
Is the goal that you don't want to actually type it each time?

If so, what does the next prompt look like?
# 5  
Old 05-18-2011
i mean the user would not ask to enter the https (SSL) password when web instance will be started. is thi spossible/>
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Restarting shell script in case of a failure

I have a shell script which sqoops data from one place to hive and it does in 2 groups list. If one group is completed it waits for the second to get completed then goto to orc load, but it it fails it kills the other groups and sends a fail email. What I was looking for is if 1 group fails, it... (1 Reply)
Discussion started by: Kunalcurious
1 Replies

2. Cybersecurity

Web Server Allows Password Auto-Completion

Hi, After running 'nessus' tool to find the Vulnerability in server OS - RHEL 5 we got " Web Server Allows Password Auto-Completion (PCI-DSS variant)" link for description provided by tools - report Nessus Plugins | Tenable Network Security I have checked - Their is only... (1 Reply)
Discussion started by: saurabh84g
1 Replies

3. Shell Programming and Scripting

sed to append on specific line in password file

I have the a group file and my ftp group line looks like this ... (3 Replies)
Discussion started by: slufoot80
3 Replies

4. Shell Programming and Scripting

Script for to kill the process Ids when restarting the unix server

Hi, I need a script to kill the process Ids for the user ABC. I prepared the following script after that while logging with user therough script i am not sure how to pass the user name and password.Can ou modify the script and help me out. #!/bin/bash for filesize in $(ls -ltr | grep... (4 Replies)
Discussion started by: victory
4 Replies

5. Shell Programming and Scripting

Scripting password prompt for restarting Jboss application

Hi When I do on console a stop, the script prompts for password > stop_idm_suite.sh Suite system password:Here experct of the shell script stop_idm_suite.sh DoIt() { # prompt System password echo "" ${BMC_JAVA_HOME}/java -Didm.suite.home=${BMC_IDM_SUITE_HOME} -classpath... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

6. Shell Programming and Scripting

Append instance count to each line

Hello forum, I need help with a script for displaying the number of instances/times a particular line appears in a tab-delimited file and append that number to the end of the line. Example text file: aaa bbb ccc ddd ggg hhh kkk nnn aaa bbb ccc ddd aaa bbb ccc ddd ppp qqq nnn sss ggg... (1 Reply)
Discussion started by: jaysean
1 Replies

7. UNIX for Dummies Questions & Answers

To append \ in the input password

Hi I have the following issue i am going to ask from the user the password The password can have $ anywhere that is first last or in between but i have to append \ before the $ sign in the password can anyone please help For example o/p in the console will be like the... (3 Replies)
Discussion started by: ssuresh1999
3 Replies

8. Shell Programming and Scripting

Please help to fingure out what wrong with my tomcat restarting bash script

Hi, I am a nbee to Unix, I have used following script to check my tomcat is running or not and restart if it down. but actually it restart my tomcat each time running even my tomcat still running fine: Script that can run a check and perform an action if the check fails ... (1 Reply)
Discussion started by: quyennd
1 Replies

9. Shell Programming and Scripting

I want to append password in /etc/shadow file

Hi, I want to append password into /etc/shadow file using a shell script. My below script does add the users to both /etc/passwd and /etc/shadow but how can I add the hordcoded passwords to /etc/shadow file can some one help me ? # To add the groups into /etc/group file for a_user... (5 Replies)
Discussion started by: modgil
5 Replies
Login or Register to Ask a Question