Page 1 of 1

Create permanent network share from linux server [solved]

Posted: Thu Jan 17, 2013 8:25 am
by longtom
Hi,

I made a little file server and created samba shares with users and passwords and all works well on the windows guest machines.

However - I would like to create a permanent share in fstab on my Linux Mint 13 Mate user machine. I fiddled with fstab using several internet resources but couldn't come up trumps. I have several windows shares permanently shared. Similar syntaxes does not seem to work with a linux share (and I need to add user and password)

Could somebody attempt to nudge me into the right direction.

Thanks.

Re: Create permanent network share from linux server

Posted: Thu Jan 17, 2013 9:10 am
by altair4
First, I would suggest using Gigolo to auto mount these shares on your Mint machine:

Using Gigolo to Mount Remote Samba Shares[/b]: http://forums.linuxmint.com/viewtopic.php?f=42&t=52144


But, If you insist on doing it the fstab way the general syntax is:

Code: Select all

//server/share /mount-point cifs username=user-name,password=secret,dir_mode=0777,file_mode=0666,nounix 0 0 
Make sure you have cifs installed since it's not in the defaults:

Code: Select all

sudo apt-get install cifs-utils

Re: Create permanent network share from linux server

Posted: Thu Jan 17, 2013 10:18 am
by longtom
Thank you for your reply.

I did the Gigolo thing. Quite a mission - especially if you have it to be set up for every user. Then - on logging in - you need to type in your password again and gigolo pops up ...
But - the folder is shared and accessible after all this. Mission accomplished.

However - a simple one-liner in fstab would have just been more convinient. Yours doesn't seem to work.

Here is my line:

Code: Select all

//192.168.1.104/opt/exp/ /media/exp cifs username=exp,password=12345,dir_mode=0777,file_mode=0666,nounix 0 0
Error is as follows:

Code: Select all

Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Re: Create permanent network share from linux server

Posted: Thu Jan 17, 2013 12:42 pm
by altair4
Gigolo doesn't require it's own password so not sure I followed that.
However - a simple one-liner in fstab would have just been more convinient. Yours doesn't seem to work.
We don't know yet if it works or not. The error you received is this:
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
It has no idea what "//192.168.1.104/opt/exp/" is - come to think of it neither do I. The form is //server/share what you gave looks more like a path on the server itself. Go to the server and run "smbtree" to find out what the share name is and use that.

EDIT: Since you are using the server's ip address and not it's hostname or netbios name it looks like there is something wrong with name services on either the server or the client so the smbtree command probably won't work. From the client machine run this instead:

Code: Select all

caja smb://192.168.1.104
That will give you a list of the servers shares.

Re: Create permanent network share from linux server

Posted: Tue Jan 22, 2013 8:27 am
by longtom
Address was wrong - should have been 192.168.1.104/exp. Yeah - little things.

Anyway - thanks for your time.