找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 23|回复: 2

rsync 同步不了 求大神协助[已经解决]

[复制链接]

35

主题

165

回帖

473

积分

中级会员

积分
473
发表于 2019-1-20 17:07:44 | 显示全部楼层 |阅读模式
本帖最后由 王健林 于 2019-1-20 17:15 编辑

两个VPS都安装老rsync ,同步 老是出现:
@ERROR: auth failed on module wwwxxx

服务器上日志:
auth failed on module wwwxxx from 62-210-217-xxx.rev.poneytelecom.eu (62.210.217.xxx) for admin: password mismatch

但是两个密码都是一样的,两个文件的 md5值也是同一个。
a6b7e1273ae0e084096f797b51550537  /etc/rsync.pass

主服务器的配置文件: cat /etc/rsyncd.conf


log file = /var/log/rsyncd.log
pidfile = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
secrets file = /etc/rsync.pass
motd file = /etc/rsyncd.Motd
#创建一个模块名称,后面需要一致
[wwwxxx]
#备份服务器目录地址
path = /home/wwwroot/default/phpmyadmin
#对应上面模块名称
comment = wwwxxx
uid = root
gid = root
port = 873
use chroot = no
read only = False
list = no
max connections = 200
timeout = 600
#创建一个同步用户名,随便取,反正后面出现的时候要一致
auth users = admin
#主服务器IP地址
hosts allow = 62.210.217.***

用户密码:/etc/rsync.pass
admin:123456


回复

使用道具 举报

35

主题

165

回帖

473

积分

中级会员

积分
473
 楼主| 发表于 2019-1-20 17:08:54 | 显示全部楼层
本帖最后由 王健林 于 2019-1-20 17:13 编辑

rsync -avz --delete --password-file=/etc/rsync.pass admin@81.89.100.***::wwwxxx /data/back/test

@ERROR: auth failed on module wwwxxx
rsync error: error starting client-server protocol (code 5) at main.c(1666) [Receiver=3.1.2]
回复

使用道具 举报

35

主题

165

回帖

473

积分

中级会员

积分
473
 楼主| 发表于 2019-1-20 17:15:04 | 显示全部楼层


已经解决


两个文件不能一样 。。
/etc/rsync.pass
主服务器的密码文件记录:用户名:密码
/etc/rsync.pass
客户端只记录密码:密码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2025-4-25 08:19 , Processed in 0.016944 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表