Sponsored Content
Top Forums Shell Programming and Scripting rsync - storing password in script Post 302378555 by stuaz on Tuesday 8th of December 2009 06:47:53 AM
Old 12-08-2009
rsync - storing password in script

Hello,

I wish to store the password in an rsync script so that when prompted it just enters the password.

I know I can set up passwordless logins, but I have never been able to do this on this particular server so I am resorting to storing the password in the script:

Code:
rsync -avz -e ssh root@XXX:/var/xxx /var/

So when the above normally prompts for a password I want it to automatically enter it is.

I have tried piping it but it doesnt work.

I have also played around with "expect" but I couldnt get "spawn" to work.

any help is greatly appriceated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

calling rsync without promting to input password

Hi , I am trying to call rsync from a perl script. I do not want to get promted for each file transfer. Is there is any way i can avoid prompting for password? I tried to store it in file and use rsync --password-file option. Command : $rsync --password-file=pass.txt -crgpto -e /usr/bin/ssh2 -v... (1 Reply)
Discussion started by: mandira
1 Replies

2. Shell Programming and Scripting

rsync without password prompt

Hi, I am tranfering the files from local machine to remote machine using rsync utility but it is prompting password. but i don't want to provide through prompt. how can i give in my shell script. can anyone suggest me.Thanks in advance rsync -rvcpogtl -e "ssh $LOCAL_PORT" $SOURCE_DIR... (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

3. AIX

PROBLEM: RSYNC and no user password "secrets"

OK, I am stuck and could use some help here. I have a RSYNC script that I wrote to where I would like to have the users password "never" initiated. I been trying to get the /etc/rsyncd.secrets file to work, but keep getting error messages. But I think it has to do with the way my script is... (2 Replies)
Discussion started by: tfort73
2 Replies

4. OS X (Apple)

get around rsync password prompt

Hey there, I'm trying to do a very simple rsync to back up my computer to an external drive connected via usb every night, but it keeps asking for a password. I tried using the password file flag, but it looks like that is only a daemon. Does anyone have any ideas? This has eaten up a lot of my... (4 Replies)
Discussion started by: aarond
4 Replies

5. Shell Programming and Scripting

Storing a password

Hello, for an automated telnet login script I need to store a password on the server. Is there a possibility to store the password in an encrypted form and decrypt it every time the login is performed? Are there any ideas Love, Sally (5 Replies)
Discussion started by: Sally[-_-]
5 Replies

6. Shell Programming and Scripting

linux service script for storing uptime

Hi, Can you please advise a script for the following: write linux service named system_up_duration .This service will create one file named uptime in directory ‘/temp/'. In this file the service will store the total time for which the system is up and running .The file will be updated after... (1 Reply)
Discussion started by: fed.linuxgossip
1 Replies

7. Homework & Coursework Questions

linux service script for storing uptime

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Can you please advise a script for the following: write linux service named system_up_duration .This service... (6 Replies)
Discussion started by: fed.linuxgossip
6 Replies

8. Shell Programming and Scripting

Perl script for taking inputs from one script and storing them into a document.

Hi. I wanted to create a Perl script which can take the outputs of a Perl script as it's input and temporarily store them in a document. Need help. Thanks.:) (8 Replies)
Discussion started by: xtatic
8 Replies

9. Shell Programming and Scripting

Storing filenames in an array in shell script

hi, i am writing a shell script in which i read a line in a variable. FNAME="s1.txt s2.txt s3.txt s4.txt s5.txt" i want to create a array and store single file names in a array.. so the array should contain arr="s1.txt" arr="s2.txt" arr="s3.txt" arr="s4.txt" arr="s5.txt" how to... (3 Replies)
Discussion started by: Little
3 Replies

10. Emergency UNIX and Linux Support

How to provide password for rsync in shell script?

Hi, i want to call the rsync in a shell script so that i can run it in background by passing the password within script itself. Can any one please let me know how can i provide the password in the shell script itself so that rsync will read the password when promted by the script. Its very... (11 Replies)
Discussion started by: Little
11 Replies
VIPW(8) 						      System Manager's Manual							   VIPW(8)

NAME
vipw - edit the password file SYNOPSIS
vipw DESCRIPTION
Vipw edits the password file while setting the appropriate locks, and does any necessary processing after the password file is unlocked. If the password file is already being edited, then you will be told to try again later. The vi editor will be used unless the environment variable EDITOR indicates an alternate editor. Vipw performs a number of consistency checks on the password entries, and will not allow a password file with a ``mangled'' entry to be installed. If vipw rejects the new password file, the user is prompted to re-enter the edit session. Once the information has been verified, vipw uses mkpasswd(8) to update the user database. This is run in the background, and, at very large sites could take several minutes. Until this update is completed, the password file is unavailable for other updates and the new information will not be available to programs. SEE ALSO
chpass(1), passwd(1), passwd(5), adduser(8), mkpasswd(8) 4th Berkeley Distribution March 11, 1989 VIPW(8)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy