Q: Rsync, Batch: How to avoid the "password" ask ?

bzels123 bzels123 at free.fr
Thu Jul 1 21:55:37 GMT 2004

Hi Tim,

Thanks for the info ... and the congratulations ;)

but now when I try to do this in a batch file :
rsync -av --delete "/cygdrive/c/Doc/backup/Desktop/MesFavories.rar" 

I got the following error :

@ERROR: auth failed on module backup_pa
rsync: connection unexpectedly closed (94 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at 

Even if I have now a different  error message than earlier (previous 
It seems to me that I'm still missing some rsync configuration stuff no ?

PS : at server side (%BSERVER%)  I launched rsync in daemon with :
        rsync --daemon --config=/etc/rsyncd.conf



Tim Conway a écrit :

>on the server side, you seem to have done it correctly.
>on the client side, you need some changes.  "--daemon" is not to tell 
>rsync to connect to an rsyncd.  "rsync://" prefex or or "::"seperator do 
>that. "--server is an option passed from an invoking rsync to the one on 
>the other end of an external transport connection - rsh, ssh, maybe even 
>local.  I don't know, because it's undocumented, because WE'RE NOT 
>Your second one, the one that asks for a password, is much more sensibly 
>phrased, and should almost work.  in its case, you are having nothing to 
>do with the rsync daemon you started on BSERVER.  It's an external 
>transport connection.  ssh is asking for a password, not rsync.  If you'd 
>been connecting to an rsyncd, rsync would have use the password you 
>correctly placed into $RSYNC_PASSWORD in the failed client-side example. 
>rsync -av --delete "/cygdrive/c/Doc/backup/Desktop/MesFavories.rar" 
>This tells rsync to connect with its internal transport to the rsyncd 
>running on (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 
>Congratulations on getting so far along in the use of a very powerful (and 
>therefore somewhat difficult to master) tool despite the language barrier, 
>and without whining.
>Tim Conway
>Unix System Administration
>Contractor - IBM Global Services
>conway at us.ibm.com
>Thanks for the info but either with or without SSH I got errors
>So my config is :
>Linux Side (Redhat 9) with rsync 2.6.2 as server
> Rsync config :
>    rsync --daemon --config=/etc/rsyncd.conf
>------     /etc/rsyncd.conf    : ----
>motd file = /etc/rsyncd.motd
>log file = /var/log/rsyncd.log
>pid file = /var/run/rsyncd.pid
>lock file = /var/run/rsync.lock
>   path = /mnt/hdc1/backup/
>   comment = Mon Serveur Rsync
>   uid = nobody
>   gid = nobody
>   read only = no
>   list = yes
>   auth users = root, bart2
>   secrets file = /etc/rsync.scrt
>------     /etc/rsync.scrt   : ----
>Client side : Windows XP
>     rsync 2.6.2 (from cygwin but only needed files not the Unix 
>lookNfeel command prompt)
>     Command file :
>      RSYNC_PASSWORD=bart2
>      rsync --server --daemon -ave ssh --delete 
>and got this error at client side:
>rsync: unable to open configuration file "rsyncd.conf": No such file or 
>rsync error: syntax or usage error (code 1) at 
>The next command works fine at client side even if the linux rsync 
>daemon is NOT launched.
>rsync -ave ssh --delete "/cygdrive/c/Doc/backup/Desktop/MesFavories.rar" 
>But it allways asks for a password !
>Thanks in advance for your help

More information about the rsync mailing list