Advertisement
Guest User

Untitled

a guest
May 21st, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. Thanks so much for the help..i was out of town and I am going to try to do this today, I have a few questions: (please be kind enough to understand that I am a newbie and might ask some stupid questions:
  2. 1) I do not believe I have a “group name”, how can I be sure about that, if I do not have one, then what should I place there.
  3. 2) If I try to do multiple computers then it will be like: [share1] (or whatever name I call the share, [share2], etc…and in the comment I am assuming this is a comment about the share, ie comment = computer of room 1
  4. 3) I am assuming that /etc/rsyncd.secrets is hide since there is were we create the password, is this something similar to what I created (see below) and if weverything works well, then I can just delete from the one I did before the lines of the /etc/fstab and the file on /root/.credentials that hold the password..(please see below)…Thanks for the help..Rafael
  5.  
  6. max connections = 2
  7. log file = /var/log/rsync.log
  8. timeout = 300
  9. [share]
  10. comment = private share
  11. path = /home/share
  12. read only = no
  13. list = yes
  14. uid = user name
  15. gid = user group
  16. auth users = user name
  17. secrets file = /etc/rsyncd.secrets
  18. Save the file as /etc/rsyncd.conf. You’ll see in the above file that I have create a directory in /home called share, to create the directory you can either use nautilus as root and create the directory, press Alt-F2 and type:
  19. gksu nautilus
  20. or create it in a terminal:
  21. sudo mkdir /home/share
  22. I’ve given the directory a permission of 700 so that only the creator and root can access the files, thus keeping them private from other users. I find the easiest way to set permissions is in a terminal To make sure you are the owner type:
  23. sudo chown -R user:user /home/share
  24. then change the permissions:
  25. sudo chmod -R 700 /home/share
  26. The next step is to create /etc/rsyncd.secrets for the user’s password. The user should be the same as above with password the one used to log into the Ubuntu server/computer.
  27. gksu gedit /etc/rsyncd.secrets
  28. the contents should be:
  29. user:password
  30. Next set the permissions for /etc/rsyncd.secrets:
  31. sudo chmod 600 /etc/rsyncd.secrets
  32. Finally start/restart xinetd
  33. sudo /etc/init.d/xinetd restart
  34.  
  35.  
  36.  
  37. That’s all you need to do to set up the rsync-daemon on your Ubuntu system.
  38. Sudo nano /etc/fstab add this to the end line and create a memo like # automatic samba
  39. //192.168.1.101/serverbackup /home/rgotten/mnt cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  40. //192.168.1.106/Charts /home/rgotten/charts.windows cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  41. //192.168.1.105/Myplasticare\040Pictures /home/rgotten/FrontDesk.Windows cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
  42. Note \040 is a to mark the space between the two words at Myplasticare Pictures
  43.  
  44. Remember to create a protected password:
  45.  
  46. /root/.credentials is a text file that contains your smb username and password. To create the file, type:
  47. Code:
  48. sudo nano /root/.credentials
  49. and add the following text:
  50. Code:
  51. username=your_smb_username
  52. password=your_smb_password
  53. Now, make the file only readable by root:
  54. Code:
  55. sudo chmod 600 /root/.credentials
  56. 6. At this point, you can either reboot or reload your fstab:
  57. Code:
  58. sudo shutdown -r now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement