Create permanent network share from linux server [solved]

Questions about cabled networking
Forum rules
Before you post please read this

Create permanent network share from linux server [solved]

Postby longtom on Thu Jan 17, 2013 8:25 am

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.
Last edited by longtom on Tue Jan 22, 2013 8:28 am, edited 1 time in total.
Regards

longtom
User avatar
longtom
Level 2
Level 2
 
Posts: 65
Joined: Mon Sep 20, 2010 8:21 am

Linux Mint is funded by ads and donations.
 

Re: Create permanent network share from linux server

Postby altair4 on Thu Jan 17, 2013 9:10 am

First, I would suggest using Gigolo to auto mount these shares on your Mint machine:

Using Gigolo to Mount Remote Samba Shares[/b]: 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
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6048
Joined: Tue Feb 03, 2009 10:27 am

Re: Create permanent network share from linux server

Postby longtom on Thu Jan 17, 2013 10:18 am

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)
Regards

longtom
User avatar
longtom
Level 2
Level 2
 
Posts: 65
Joined: Mon Sep 20, 2010 8:21 am

Re: Create permanent network share from linux server

Postby altair4 on Thu Jan 17, 2013 12:42 pm

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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6048
Joined: Tue Feb 03, 2009 10:27 am

Re: Create permanent network share from linux server

Postby longtom on Tue Jan 22, 2013 8:27 am

Address was wrong - should have been 192.168.1.104/exp. Yeah - little things.

Anyway - thanks for your time.
Regards

longtom
User avatar
longtom
Level 2
Level 2
 
Posts: 65
Joined: Mon Sep 20, 2010 8:21 am


Return to Ethernet

Who is online

Users browsing this forum: No registered users and 6 guests