Q: Rsync, Batch: How to avoid the "password" ask ?
bzels123
bzels123 at free.fr
Thu Jul 1 21:40:54 GMT 2004
Hi John,
assuming :
user = bart2
pwd = bart2
I'm sorry but I just tried your tip either with or without SSH, in a CMD
windows shell:
1) echo bart2| rsync -av --delete
"/cygdrive/c/Doc/backup/Desktop/MesFavories.rar"
bart2 at 192.168.0.102:/home/bart2/backup/backfull
2) echo bart2| rsync -ave ssh --delete
"/cygdrive/c/Doc/backup/Desktop/MesFavories.rar"
bart2 at 192.168.0.102:/home/bart2/backup/backfull
And still got the ask of a password :(
Did I miss something ?
Rgds,
Bart.
John Taylor a écrit :
>On Thu, Jul 01, 2004 at 01:19:42PM -0600, Tim Conway wrote:
>
>
>>SET BSERVER=192.168.0.102
>>SET RSYNC_PASSWORD=bart2
>>rsync -av --delete "/cygdrive/c/Doc/backup/Desktop/MesFavories.rar"
>>bart2@%BSERVER%::backup_pa/current/bz/favories
>>
>>This tells rsync to connect with its internal transport to the rsyncd
>>running on 192.168.0.102 (on the default port, 873), and place
>>/cygdrive/c/Doc/backup/Desktop/MesFavories.rar in the subdirectory
>>current/bz/favories in the module "backup_pa", i.e.,
>>/mnt/hdc1/backup/current/bz/favories. It connects with the rsync username
>>(no relation to any unix username - you made it point to "nobody", as does
>>"root") bart2, using the password "bart2" from the RSYNC_PASSWORD
>>environmental variable. I am surprised it works using a mix of unix path
>>declarations and dos environmental declarations. Since you're already in
>>cygwin, I'd just use pure sh, or if you must run it from the dos
>>environment, i.e. a bat file, I'd specify the windows side path in dos
>>style.
>>
>>
>
>This is a nice tip about the password. I always did it this way:
>echo my_password| rsync ...
>
>which is different than
>echo my_password | rsync ...
>
>Notice the space before the pipe. Windows sends the space as part of
>the password, and thus sends an invalid password to rsync.
>
>-John
>
>
More information about the rsync
mailing list