automating password ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting automating password ?
# 1  
Old 05-24-2004
automating password ?

Hi all,
I want to write a script which logs into a database (DB2). To do this i need to have a password. This will be done lots and lots of times, so i need to modify the script to automate the response to the password request.

How do i this, because at present i do the following:
db2 connect to dnb0j2 user liam
it does not return to the script to allow me to respond with the password.

Can someone give me an example ? or point me in the right direction?

Thanks.
# 2  
Old 05-24-2004
You can do it by

db2 connect to dnb0j2 user liam using passwd


Try this.
# 3  
Old 05-24-2004
if fact i was trying this, but our system is not allowing this to work correctly with the authorization credentials.

is there a way to do this in a script??
# 4  
Old 05-24-2004
what do you mean by your system is not working correctly. What is the error it is giving. post it in detail.

I am expecting this has something with the way you are executing your shell. execute the script with in the same shell. That means use either of these commands to execute the script.

source scr_name (or)
. scr_name


write a script like this.

db2 connect to data_base user user_name using password


I think this should work.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies

2. UNIX for Beginners Questions & Answers

Automating UNIX/Solaris password resets

Hi, we are running solaris 5.10 and looking for solutions to automate password resets? Plz assist. Thanks, Sridhar (6 Replies)
Discussion started by: chvgms
6 Replies

3. UNIX for Advanced & Expert Users

Automating Password reset without shell usage

Our application runs on AIX and the users of the application do not have a way to land at the prompt/shell by any means. When they login to the box, the application opens up directly. I would like to know of a way to automate the password reset process for these user ids, without them having to... (2 Replies)
Discussion started by: ggayathri
2 Replies

4. Shell Programming and Scripting

Automating

Hi All, I have a shell script that is integrated with a fault management system. It periodically monitors the system and raises an alarm. This script has different functions and it accepts input from us on the console. Is there any way to invoke it using a shell script ? Please advise. ... (2 Replies)
Discussion started by: praviper
2 Replies

5. UNIX for Dummies Questions & Answers

Automating a process

Could any one tell me , how to start a thread here, i just searching for so long. sorry to post in irrelavent here ---------- Post updated at 08:19 AM ---------- Previous update was at 08:00 AM ---------- Hi, I got a requirement to automate the process. We have SLA files, there are... (1 Reply)
Discussion started by: afahmed
1 Replies

6. UNIX for Advanced & Expert Users

Automating Interactive password change

I have written the below scripts . ldap_pwd_prompt.ksh #!/usr/bin/ksh passwd -r ldap interactive_pwd_change.exp #!/usr/local/bin/expect set timeout 10 set curpass set newpass spawn ./ldap_pwd_prompt.ksh expect "Enter existing login password:" send "$curpass\r" expect "New... (6 Replies)
Discussion started by: dr46014
6 Replies

7. Shell Programming and Scripting

Automating The process

Hi Guru's, I am trying to write a scripts that will automate my image provisoining process. Scenario: I have Linux Image Hosted on cloud which needs to be provisoned before it can be used. Currently we log onto the image through the putty on windows and connect to linux instance. I... (3 Replies)
Discussion started by: taqvia
3 Replies

8. Shell Programming and Scripting

automating username / password entry

I have a database that contains a list of server names, and the password for the root user on several servers (100+). I need to verify the passwords for each of the servers in an automated fashion because the database continues to grow. All of the users that I'm going to test are ROOT. I can't... (1 Reply)
Discussion started by: jbeck22
1 Replies

9. Shell Programming and Scripting

automating ssh session with password

Hi Can anyone help me in automate a ssh session with password using shell script (7 Replies)
Discussion started by: raghav288
7 Replies

10. UNIX for Dummies Questions & Answers

Automating password change

Hi, I'm trying to create a shell to change some user password with random string. I've tried to use stdin redirection to supply the new password by a response file: passwd theuser < respfile but I continue to be prompted for supplying pwd via console keyboard. Can you help me to... (2 Replies)
Discussion started by: nisant
2 Replies
Login or Register to Ask a Question