Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-06-2005, 08:40 PM
|
#1
|
Member
Registered: Apr 2004
Distribution: Dapper
Posts: 167
Rep:
|
rsync authentication
Hi, I'm running an rsync server, and I want to add user authentication. Can anybody explain to me how to do it, because I seem to be doing something wrong.
Here is the module in rsyncd.conf:
Code:
[chris]
path = /share/chris
comment = chris' files
uid = chris
gid = chris
auth users = chris
secrets file = /etc/rsyncd.secrets
Here's my rsync.secrets file:
So I run
Code:
$ rsync -Cavz chris@localhost::chris/home
Password: hello
@ERROR: auth failed on module chris
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
Note that all of this works if I comment out the auth users line in the rsyncd.conf.
So does anybody see what I'm doing wrong?
|
|
|
09-06-2005, 09:12 PM
|
#2
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
First off, make sure they're both either rsync.secrets or rsyncd.secrets... you call it by both names here. Could be a typo, could be the root cause of the problem. Secondly, make sure the file is terminated by a newline character.
|
|
|
09-06-2005, 09:17 PM
|
#3
|
Member
Registered: Apr 2004
Distribution: Dapper
Posts: 167
Original Poster
Rep:
|
Yeah, it was just a typo.
And yes, the file is terminated with a newline.
|
|
|
09-06-2005, 09:50 PM
|
#4
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
What are the permissions on the file?
|
|
|
09-06-2005, 10:29 PM
|
#5
|
Member
Registered: Apr 2004
Distribution: Dapper
Posts: 167
Original Poster
Rep:
|
Hi. I know a lot of people here don't know what they're doing, but I know how to get around and debug most basic Unix problems. Please assume that I've checked the obvious things. What I actually need is someone who's used rsync with authentication, and I need them to tell me if there's anything wrong with my configuration or if they had any similar troubles and how they resolved them.
If it helps, I'm running Ubuntu Hoary Hedgehog and the standard rsync package.
That said,
Code:
$ ls -l /etc/rsyncd.secrets
-rw-r--r-- 1 root root 24 2005-09-06 21:17 /etc/rsyncd.secrets
|
|
|
09-06-2005, 10:34 PM
|
#6
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
I hope you didn't feel I was trying to treat you stupidly or anything like that. It *IS* hard to tell sometimes whether a user has checked those things.
Ironically enough, your problem is in the secrets file permissions. If the file is readable by 'others', then rsync will disallow access unless you have "strict modes" set to false. From the rsyncd.conf man page:
Quote:
There is no default for the "secrets file" option, you must
choose a name (such as /etc/rsyncd.secrets). The file must nor-
mally not be readable by "other"; see "strict modes".
strict modes
The "strict modes" option determines whether or not the permis-
sions on the secrets file will be checked. If "strict modes" is
true, then the secrets file must not be readable by any user id
other than the one that the rsync daemon is running under. If
"strict modes" is false, the check is not performed. The
default is true. This option was added to accommodate rsync
running on the Windows operating system.
|
Let me know how it goes.
|
|
|
09-06-2005, 11:05 PM
|
#7
|
Member
Registered: Apr 2004
Distribution: Dapper
Posts: 167
Original Poster
Rep:
|
Good call. I had read that, but I missed the part where it said the default was true. That was the problem.
Thanks. It's always nice to have someone say "Stop being stupid and read".
And I know it's hard to tell whether or not someone knows what they're doing. My solution typically is to ask all the simple questions in one go to jog their memory. I just get tired of the back and forth of one obvious question, one obvious answer.
|
|
|
09-07-2005, 07:19 AM
|
#8
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
I probably should've done that in the first place, but I hadn't gone back to look at the rsyncd.conf man page yet.  I'm glad it worked out for you.
|
|
|
All times are GMT -5. The time now is 06:51 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|