Difference between revisions of "Mount Shares Locally"
From Amahi Wiki
m |
|||
Line 1: | Line 1: | ||
Mounting your Samba shares locally is useful when you are using Greyhole, and want to write or in any way work with those files locally. Greyhole data should only be accessed through shares, so mounting those shares locally is an easy way to work with Greyhole data safely. | Mounting your Samba shares locally is useful when you are using Greyhole, and want to write or in any way work with those files locally. Greyhole data should only be accessed through shares, so mounting those shares locally is an easy way to work with Greyhole data safely. | ||
− | * | + | * Install the mount_shares_locally initd script: |
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; overflow: scroll"> | <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; overflow: scroll"> | ||
− | + | curl -o /etc/init.d/mount_shares_locally http://dl.dropbox.com/u/3022105/Amahi/mount_shares_locally | |
+ | chmod +x /etc/init.d/mount_shares_locally | ||
+ | chkconfig --add mount_shares_locally | ||
</div> | </div> | ||
− | + | * Edit /etc/init.d/mount_shares_locally in a text editor, and replace ''your_username'' (on line 12) with your username. | |
− | |||
− | * Create the ''/home/< | + | * Create the ''/home/<your_username>/.smb_credentials'' file. This is a simple text file (use your favorite text editor). |
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> | <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> | ||
username=<your_username> | username=<your_username> | ||
Line 16: | Line 17: | ||
</div> | </div> | ||
− | + | To test your new mounts, you can execute '''service mount_shares_locally start'''<br/> | |
+ | You will find the mounted shares in ''/mnt/samba/*''<br/> | ||
+ | '''service mount_shares_locally stop''' will unmount the local shares.<br/> | ||
− | + | Note: if you used /etc/rc.local and /etc/fstab to mount shares locally in the past, you can remove what you added in those files now. The above initd script replaces all this. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 03:05, 20 December 2010
Mounting your Samba shares locally is useful when you are using Greyhole, and want to write or in any way work with those files locally. Greyhole data should only be accessed through shares, so mounting those shares locally is an easy way to work with Greyhole data safely.
- Install the mount_shares_locally initd script:
curl -o /etc/init.d/mount_shares_locally http://dl.dropbox.com/u/3022105/Amahi/mount_shares_locally chmod +x /etc/init.d/mount_shares_locally chkconfig --add mount_shares_locally
- Edit /etc/init.d/mount_shares_locally in a text editor, and replace your_username (on line 12) with your username.
- Create the /home/<your_username>/.smb_credentials file. This is a simple text file (use your favorite text editor).
username=<your_username> password=<your_password> domain=HOME
To test your new mounts, you can execute service mount_shares_locally start
You will find the mounted shares in /mnt/samba/*
service mount_shares_locally stop will unmount the local shares.
Note: if you used /etc/rc.local and /etc/fstab to mount shares locally in the past, you can remove what you added in those files now. The above initd script replaces all this.