Back to basics - Re: Q: Rsync, Batch: How to avoid the "password" ask ?

Stuart Halliday StuartH at
Fri Jul 2 09:37:18 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" 
> bart2@%BSERVER%::backup_pa
> 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 
> /home/lapo/packaging/tmp/rsync-2.6.2/io.c(342)

Best to try the basic things first.

Try typing in your XP's open command prompt window the following two commands:

rsync bart2 at

You should get a list of the files in the module backup_pa which you've said is pointing to '/mnt/hdc1/backup/'

Ensure you *do* have a couple of files in there of course to list. :-)

If that doesn't work then the problem is in the Linux rsync side in either your Linux permissions/firewall/rsyncd.conf file.

Try a very basic rsyncd.conf file on your Linux machine. 

For example.

 path = /mnt/hdc1/backup/
 read only = no
 list = yes
# auth users = bart2
# secrets file = /etc/rsync.scrt

This will allow anyone to connect as I've disabled the auth and secret liners. But it will allow you to see if you *can* connect.

So type in a XP command prompt:


Again you should see a list of files.

If not, then there is a permission problem on the path to the backup folder or perhaps a firewall problem on your Linux machine.

Once you've got a file listing then change your rsyncd.conf line by line. But re-test from your XP machine to see if the behaviour changes unexpectingly. Then you'll know where you've gone wrong.

More information about the rsync mailing list