免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 21354 | 回复: 20
打印 上一主题 下一主题

怎样才能在rsync客户端不输入密码就能直接运行(内详) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-23 11:54 |只看该作者 |倒序浏览
那么我的rsync 服务端rsyncd.conf设置
list = yes
uid = noboby
gid = noboby
read only = true
use chroot = no
transfer logging = true
hosts allow = 192.168.0.133/24
hosts deny = 192.168.0.0/24
max connections = 4
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
slp refresh = 300
#[Example]
#        path = /home/Example
#        comment = An Example
#        auth users = user
#        secrets file = /etc/rsyncd.secrets
[test]
path = /mnt/wwf
cmment = test
auth users = test
secrets file = /etc/rsyncd.secrets
/etc/rsyncd.secrets的设置是
test:821121  #这样编写的

客户端
/usr/sbin/rsyncd --daemon
rsync -a --progress test@192.168.0.86:/mnt/wwf  /mnt
输入以后会提示输入密码

客户端密码文件在/etc/rsyncd.secrets
test:821121  #这样编写的
rsync -a --progress  --password-file=/etc/rsyncd.secrets   test@192.168.0.86:/mnt/wwf  /mnt
可惜最后还是要提示密码
我想问怎样才能不用输入密码,因为我想自动备份.没有理由次次备份都要输入密码.我试过用标准输入解决,但是不成功.


并且我在系统新建了test这个帐号,密码是821121
我的客户端rsyncd.conf没有设置过

[ 本帖最后由 babboyshi 于 2007-5-23 12:00 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-05-23 12:14 |只看该作者
客户端的rsyncd.conf
gid = users

read only = true

use chroot = true

transfer logging = true

log format = %h %o %f %l %b

log file = /var/log/rsyncd.log

hosts allow = trusted.hosts

slp refresh = 300


#[Example]

#        path = /home/Example

#        comment = An Example

#        auth users = user

#        secrets file = /etc/rsyncd.secrets

论坛徽章:
0
3 [报告]
发表于 2007-05-24 00:11 |只看该作者
唉!自己顶自己一下吧

论坛徽章:
0
4 [报告]
发表于 2007-05-24 09:25 |只看该作者
修改如下:

客户端密码文件在/etc/rsyncd.secrets
821121  #这样编写的

论坛徽章:
0
5 [报告]
发表于 2007-05-24 11:45 |只看该作者
不行啊,究竟是什么原因

论坛徽章:
0
6 [报告]
发表于 2007-05-24 11:51 |只看该作者
我的系统是SUSE Linux Enterprise Server 10

论坛徽章:
0
7 [报告]
发表于 2007-05-24 15:53 |只看该作者
rsync -a --progress  --password-file=/etc/rsyncd.secrets   test@192.168.0.86:/mnt/wwf  /mnt
改为
rsync -a --progress  --password-file=/etc/rsyncd.secrets   test@192.168.0.86::test /mnt/wwf  /mnt


加上test这个认证模块

论坛徽章:
0
8 [报告]
发表于 2007-05-24 16:31 |只看该作者
原帖由 星期二 于 2007-5-24 15:53 发表于 7楼  
rsync -a --progress  --password-file=/etc/rsyncd.secrets   test@192.168.0.86:/mnt/wwf  /mnt
改为
rsync -a --progress  --password-file=/etc/rsyncd.secrets   test@192.168.0.86::test /mnt/wwf  /mn ...



不行啊,我试过了,还是需要输入密码.我的客户端/etc/rsyncd.secrets
821121 #试过
test:821121 #都试过
如果输入rsync -a --progress  --password-file=/etc/rsyncd.secrets   test@192.168.0.86::test  /mnt
就会显示的错误是代码是@ERROR:auth failed on module test rsync error:error starting client-server protocol (code 5) at
main.c (1183)

[ 本帖最后由 babboyshi 于 2007-5-24 16:33 编辑 ]

论坛徽章:
0
9 [报告]
发表于 2007-05-24 16:42 |只看该作者
ERROR:auth failed on module

chmod 600 /etc/rsyncd.secrets

论坛徽章:
0
10 [报告]
发表于 2007-05-24 16:44 |只看该作者
test:821121
是服务端的rsync.secrets
821121
是客户端的rsync.secrets


仔细检查
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP