Modifying the MBWEII
WD appears to have embraced the hacking community because not only do they provide root access for the new MBWEs, but you don't have to jump through hoops to get changes to remain after you reboot the NAS. The good news is your changes get written to disk. But the bad news is that because of that, you can mess up your MBWEII if you are sloppy or get too rambunctious with your edits.
I found the basic clues to getting the MBWEII prepped as an rsync target here. Since rsync was already installed as a service, I didn't need to edit /etc/services to add it. I did, however, have to add the following line to /etc/inetd.conf:
rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon
The more difficult task was figuring out the /etc/rsyncd.conf file. But, once again, the information on the Turning It Into a Rsync Server page got me pointed in the right direction. To save you time, here's what I came up with:
[Public] path = /shares/Public comment = "rsync test folder" read only = no [test] path = /shares/test comment = "rsync test folder" read only = no auth users = test uid = root gid = jewab secrets file = /etc/rsyncd.secrets
This rsyncd.conf file specifies two rsync "modules", or shares that can be used as rsync targets. The first, [Public], lets you use the MBWE's default Public share as the target. Even though the Public folder isn't password protected, I have found that you can use any username / password for rsync backup servers that won't let you create a backup job without them (Synology, QNAP). I usually use admin / admin or whatever the admin interface login is for the rsync target NAS.
The read only = no line is important, even with a publicly-accessible share. Without it, you'll get a read-only error when you try to connect to the target.
The second target, [test], is a folder that I first created via the MBWE's GUI and gave read/write permissions to only the default admin user and a user test that I created with password test (Figure 4).
Figure 4: Setting the test share permissions
Using an access-controlled folder as an rsync target requires setting the auth users, uid, gid and secrets file parameters in the rsyncd.conf file:
- auth users is set equal to the folder name (test)
- uid, gid are the Linux user/owner and group IDs. I found these by checking the folder properties using WinSCP (Figure 5)
- secrets file is set to the path to the file that holds user and password information, one user per line in the format username : password. This file is usually named rsyncd.secrets and is also located in /etc. In this example, it contained one line: test:test.
Figure 5: Checking test folder properties with WinSCP
Related Items:Fun With Rsync And More On The WD My Book Live
How To Back Up NAS to NAS - Part 4
How To Back Up NAS to NAS - Part 2
How To Back Up NAS to NAS - Part 1
Slideshow: Western Digital My Book World Edition II (white bar)