It is possible to run rsync over ssh as a non-root user with the built-in sshd. Several people have asked about this, but I haven't seen an answer, so I thought it would be useful to post what worked for me. Note that due to the way that synology has hacked their version of openssh, it is not possible to get a fully tty-enabled shell session, but it is possible to run rsync (for those who might be interested, if you have the GPL sources, take a look at openssh-4.2p1/session.c). If you want to do more than rsync, you'll have to go the ipkg route to install your own ssh, etc.
Disclaimer: I am using a DS207+ with the 0518, so this may not work for other models, or may not work for you at all. I take no responsibility for any data loss or other damage to your NAS.
These steps assume some basic UNIX knowledge.
0) If you have not already done so, add a user via the web interface, and, of course, install the "Enable ssh" patch.
1) Log in as root over ssh.
2) Create a directory somewhere on your NAS volume(s) to be used as a home directory for the desired user. Let's call the username "joe". Change the owner of this directory to be joe, and make sure joe has rwx permissions.
3) Edit /etc/passwd. Find the entry for joe and change the the home directory field (the string between the second-to-last and last colon characters on joe's entry) to match the directory you created in 2. Change the shell field (the string after the last colon) to be the path to a shell that exists on your NAS. On my NAS that's either /bin/sh or /bin/ash. Save the file. [ NOTE: One pitfall you might run into: I've found if you modify this user via the web interface, e.g. change its password, these edits will revert to the default values, so you might need to do this edit again sometime if you forget about this ]
4) Try executing the command "su - joe" (substituting your username for joe, of course). If you've done everything right so far, you should start a new shell without errors, fully logged in as joe. The result of "pwd" should be joe's home directory, and the result of 'id' should return joe's uid and gid. If not, try again. If you're going to create RSA/DSA keys as I recommend in the next step, it will be easier to get the ownership and permissions of the keys right if you're logged in as joe. You can create a .profile for joe with environment settings you like, but be sure to keep /usr/syno/bin in your path, which is where the rsync binary is located. Due to the aforementioned ssh hack, rync's --rsync-path flag will not work. Once you're done with editing joe's files, you can type "exit" to return to your root shell.
5) I recommend installing RSA/DSA keys at this point in joe's home directory - search for "ssh-keygen" on the web to learn more about this. I'm not using password auth myself, so I have not tested this thoroughly, but if you really want to use password authentication, you should be able to do so by creating an entry in /etc/rsyncd.secrets for joe consisting of joe:password. The password can be in cleartext. The entry for root contains two passwords separated by a pipe character. The first is just a cleartext password (really - try it - I really hope that it is different for each system!), and the second is your admin password in obfuscated form (not really encrypted). The cleartext password should work on its own, and the obfuscation method really doesn't provide any greater security.
6) That's it - try rsyncing something to your NAS as joe. If you have trouble, it might help to pass the -v flag to ssh so that you can get an idea where the process is failing. You might also want to use rsync's --dry-run flag until you have all the kinks worked out. Good luck!



