rsync 卡在密碼檔 - Linux

Table of Contents


我下了這指令:
/usr/bin/rsync -avz --delete --password-file=/etc/rsyncd.secrets /hom
e/andy/tmp [email protected]::test

出現error message:
@ERROR: auth failed on module test
rsync error: error starting client-server protocol (code 5) at main.c(1518)

自行檢查:
1.到192.168.9.2電腦上檢查 /etc/rsyncd.conf 上面的 auth user 確定有加入root
2.檢查rsyncd.secrets檔案 確定權限為600 也確定內容為root的密碼
3.拿掉 password-file 測試 下指令
/usr/bin/rsync -avz --delete /home/andy/tmp [email protected]::test
手動key入正確密碼 能夠成功完成同步
手動key不正確密碼 又出現
@ERROR: auth failed on module test
rsync error: error starting client-server protocol (code 5) at main.c(1518)

我有確定 /etc/rsyncd.secrets 的內容確實是跟我手動key的密碼相同!!
想請問該如何排解這個error?


--

All Comments

Daniel avatarDaniel2012-04-14
找到問題點了 !! 雖然很瞎 但是還是分享一下
Ursula avatarUrsula2012-04-16
在local的rsync.secret檔案中, 因為我有寫註解#..xxoo
它抓密碼時 連註解也抓進去... 砍掉註解就沒問題了^^