Create permanent network share from linux server [solved]

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
longtom

Create permanent network share from linux server [solved]

Post 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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: Create permanent network share from linux server

Post 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
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
longtom

Re: Create permanent network share from linux server

Post 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)
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: Create permanent network share from linux server

Post 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.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
longtom

Re: Create permanent network share from linux server

Post by longtom »

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

Anyway - thanks for your time.
Locked

Return to “Networking”