BFXdocs
BFXdocs powered by: Knowledgeroot
BeaFanatIX (BFX): Website - Forums
First we need to create a mountpoint to where we want to mount the share. Usually "/mnt" is used for that. But you can use a mountpoint anywhere you like. For this example we do use "/mnt". First we choose an appropiate name for the share's mountpoint, for it will be the name shown in nautilus as well. Let's call it "test-share".

To create the mountpoint:

1. #> sudo mkdir /mnt/test-share

To be able to mount the share as a normal user and not just root the mountpoint must belong to the user who want to mount it. On the LiveCD the default user is "bea". (for an installation you have to change "bea" to your user name)

2. #> sudo chown bea:bea /mnt/test-share

The next step is to edit the fstab:

3. #> sudo gedit /etc/fstab

The (samba) syntax for the fstab is:

<//server/share> <mountpoint> <filesystem> <options> 0 0

<//server/share>:
"server" is the IP of the PC that servers the share. "share" is of course the share you set up. The initial double slashes "//" are essential.

<mountpoint>:
The mountpoint you created in step 1.

<filesystem>:
Since it is a samba share the fs is "smbfs"

<options>:
- read/write (rw), read-only(ro). If you have write access to the share mount it "rw".
- "users" this is essential to be able to mount it
- "noauto" will prevent automatic mounting on boot. This is useful if the share is not always accessable, e.g. if the PC is not running.
- "username=|password=" are of the samba share not of the linux user! If you restricted your share, you need to give them here, in order to be able to connect to the share. To honest, I never managed to do it without them! 
   
That leads to an entry like:

//192.168.2.1/share1 /mnt/test-share smbfs rw,users,noauto,username=USERNAME,password=PASS 0 0

Save your new fstab and almost emediatly a new drive "test-share" shows up in nautilus. From this on it will work like any other drive (mount/umount) if the server is present!
Top ]