Hurtig adgang til alle delinger på LAN med bash

frogmaster
Antal: 4831
Tilmeldt:
20-05-2010
User is offline
Hurtig adgang til alle delinger på LAN med bash

Hurtig adgang til alle delinger på LAN med bash.
Hvis du opretter et script, vil metoden være langt hurtigere end fra DE. fstab er ikke involveret. En kort video der viser det i aktion: https://www.dropbox.com/s/p1wtlki07hie0x1/mount-ex...

1. From within the home folder, create a folder named by choice. Here it's called "remote-shares". We use that as mount point.

2. Open "remote-shares" and within, create folders with the same names as the remote shares.
Create as many you want to as many remote computers and shares you wish.

The syntax from the terminal is for each share:

Example 1 - Using this require you type the password for every share.
sudo mount -t cifs -o user=remote-user-name,iocharset=utf8,noperm //remote-ip-address/remote-share-name ~/remote-shares/remote-share-name

Example 2 - The passwords are included within the syntax.
sudo mount -t cifs -o user=remote-user-name,remote-share-password,iocharset=utf8,noperm //remote-ip-address/remote-share-name ~/remote-shares/remote-share-name

Unmount all shares at ones
sudo umount -t cifs -a  ~/remote-shares