passing password to a command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting passing password to a command
# 1  
Old 08-18-2010
passing password to a command

Hi all,

I have the expect binaries in our boxes..

I want to pass a passwd to a command automatically without manual intervention using "/<path_of_expect>/expect/<version>/bin/autopasswd"

The below command will ask passwd in my script

Code:
 
cleartool rmtag -all <vob_tag>
#Some messages/Warnings will come here, then it'll ask passwd
Registry passwd:




Can any one please provide the way how to use the expect with the command to avoid asking passwd....SmilieSmilie

Thanks in advance..

Regards,
VRN
# 2  
Old 08-18-2010
# 3  
Old 08-19-2010
sorry... didnt get anything in the above link...
FYI.. i have the expect script in our binaries... i want to know that how to use it when a command asked for a passwd....?

Can you please provide the way??

Thanks in advance...

Regards,
VRN
# 4  
Old 08-29-2010
anyone please help on above requirment....???
# 5  
Old 08-30-2010
did you look at this line in the file provided at above link?

send_user "Sending file(s) to hosts WITHOUT a password...\n"
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing password with SSH command

Hi Experts, I have specific requirement where I want to pass the password with the ssh username@hostname command . I dont want to use RSA public and private keys also. Because that will be on production server and no one wants to give access like that. Second thing it is production... (14 Replies)
Discussion started by: sharsour
14 Replies

2. UNIX for Dummies Questions & Answers

Passing password to sudo login

Hi All, I am trying use the below su command to execute a shell script using different user. Caould some one please help me out as to how to pass the pass the password when prompted or is there any way to execute the shell script using other user. I have had look at the other posts in forum... (1 Reply)
Discussion started by: abhi_n123
1 Replies

3. Shell Programming and Scripting

Passing password for ssh in Script

I want to do following 2 commands via script: 1) eval `ssh-agent`2) ssh-add /export/home/sufuser/.ssh/id_rsa When asked for passphrase enter "passwordpassword1234 but whenever I run the script it stucks after "ssh-add /export/home/sufuser/.ssh/id_rsa" command and asks fro... (4 Replies)
Discussion started by: yogeshpawar
4 Replies

4. UNIX and Linux Applications

SFTP without passing the password

Hi All, I am trying to do SFTP without passing the password. I did it by generating the Key pair on both source and destination servers but the problem is My script is running with BATCHADM user whereas I am doing SFTP using another username (sftp user1@destinationServer) due to which it is... (3 Replies)
Discussion started by: kaurr06
3 Replies

5. Shell Programming and Scripting

FTP command line username and password passing

Dear All, I am new to unix and I am trying to build a shell script which will connect to a different server by passing username and password from a file or command line but not manually... In short I dont want to connect to a diff server via ftp interactively. Any suggestion...looking... (8 Replies)
Discussion started by: Pratik4891
8 Replies

6. Shell Programming and Scripting

passing database password to isql command in shell script

Hi, I need to connect to DB through my shell script. but I dont want to hardcode my db password in the script. Is there a way to do it? Thanks ---------- Post updated at 07:42 PM ---------- Previous update was at 04:54 PM ---------- :(Guys..please help me with this:( (1 Reply)
Discussion started by: agrawal.prachi
1 Replies

7. Shell Programming and Scripting

Passing Password into scp Command

Hi Everyone, I'm trying to run scp as a one-line command, as of right now, it prompts me for the user's password to the remote machine. Does anyone know if there is an option to pass the password parameter into the scp command on the same line so it doesn't prompt me? Thanks! (1 Reply)
Discussion started by: twhitmarsh
1 Replies

8. UNIX for Advanced & Expert Users

Passing a password to su

Hi I am running unix commands through Oracle, but I want to be able to run sftp which oracle cannot use. What I want to do is run a script which runs as oracle user but has the su command in, to connect as another user that has sftp access. I am trying the below. su - dwintuser -c gary.ksh... (2 Replies)
Discussion started by: colesga
2 Replies

9. Shell Programming and Scripting

Passing the password in csh ( su )

Hi, How do I pass the password from a csh script when I su to a different user ? ( Root is not running this script ) Thanks (1 Reply)
Discussion started by: ayeger
1 Replies

10. Shell Programming and Scripting

passing password to rlogin

I have access to seperate Unix server that has specific scripts that I need to run from time to time. What I would like to do is pass my password in the script, instead of having to type the password then run the script all from the original script. Is this possible? ;) (2 Replies)
Discussion started by: jagannatha
2 Replies
Login or Register to Ask a Question