LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-23-2005, 02:03 AM   #1
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Rep: Reputation: 15
Mounting over the network / internet


Hi there,

I'm kind of new to this kind of thing, but I have a problem: at startup I want to automaticly mount a share which I can reach using the following adres: subdomain.company.ltd/sharename. The server which hosts this share runs on FreeBSD and is sharing it using Samba. How can I modify fstab (or anything else) so that the share automaticly gets mounted as ~/share.

Thanks in advance for any help.

Best regards,
Jethro

PS. I'm using Mandriva 2006
 
Old 11-23-2005, 03:52 AM   #2
karpi
Member
 
Registered: Oct 2005
Location: Germany
Distribution: Suse
Posts: 134

Rep: Reputation: 15
Hello,

I don't know how it works with Mandriva.

But SuSE has e file smbfstab in /etc/samba. Maybe this exists also for Mandriva.
The shares will be mounted on boot-time.


HTH
 
Old 11-23-2005, 04:50 AM   #3
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
I don't have that file

I have /etc/fstab though, but I don't know if this gets mounted at boot-time and I'm also not sure what to put in there.
 
Old 11-23-2005, 06:29 AM   #4
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
1)First you need to create the directory share in your home folder
mkdir ~/share

2)Then add this line to your /etc/fstab file

//servername/sharename ~/share smbfs \
username=windowsuserename,password=windowspassword 0 0
 
Old 11-23-2005, 06:32 AM   #5
karpi
Member
 
Registered: Oct 2005
Location: Germany
Distribution: Suse
Posts: 134

Rep: Reputation: 15
Hi,

look for the file smbfstab where your smb.conf or is located.

You should also have a look at the documentation
HTH
 
Old 11-23-2005, 06:39 AM   #6
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by karpi
Hi,

look for the file smbfstab where your smb.conf or is located.

You should also have a look at the documentation
HTH
My smb.conf is at /etc/samba/, but there is no smbfstab there.
 
Old 11-23-2005, 06:40 AM   #7
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by kolonell

2)Then add this line to your /etc/fstab file

//servername/sharename ~/share smbfs \
username=windowsuserename,password=windowspassword 0 0
This should be on 2 lines?

The share isn't on a Windows machine but on a FreeBSD machine by the way.
 
Old 11-23-2005, 10:35 AM   #8
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Quote:
//servername/sharename ~/share smbfs \
username=windowsuserename,password=windowspassword 0 0
It should be on 1 line ( the \ is just to indicate that this line continues ) ...

Quote:
The share isn't on a Windows machine but on a FreeBSD machine by the way.
That doesn't matter ... just replace windowsuserename and windowspassword with your login credentials and that is it (if no loginname and password is needed just leave it out )
 
Old 11-23-2005, 10:55 AM   #9
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
And what will happen when I startup the laptop where this code is in the fstab without an internet connection? Does it corrupt anything?
 
Old 11-23-2005, 12:25 PM   #10
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
no then It just won't be mounted . then you mount it manually (with mount command)

btw ... here is an example of an entry in my fstab to mount a share in my /mnt/samba

Code:
\\192.168.0.195\private /mnt/samba smbfs auto,user,username=kolonell,password=****** 0 0
The password is left out for the obvious reasons ;-)
 
Old 11-24-2005, 01:47 AM   #11
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by kolonell
no then It just won't be mounted . then you mount it manually (with mount command)
I see, but I guess the entry in the fstab will still be there, so the next time when I will boot with an internet connection Linux will try to mount it again.

Quote:
Originally posted by kolonell
btw ... here is an example of an entry in my fstab to mount a share in my /mnt/samba

Code:
\\192.168.0.195\private /mnt/samba smbfs auto,user,username=kolonell,password=****** 0 0
Alright, there are 2 things which standout in your code:
first: the slashes in the remote adres are different in the one you posted for me, I assume that's because you're mounting to an Windows PC and I will not?
second: you have the commands "auto" and "user" before the username, what do they mean?
 
Old 11-24-2005, 02:34 AM   #12
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
1 ) It doesn't really matter which Slashes they are (I tried to replace \ with / and it worked too )

2 ) about the auto,user options
auto means that it will mount automatically (eg at boot time) and user means that
an user can mount the share (if you want to know more about different options --> man fstab )

I can see How this was confusing ... sorry about that

Last edited by kolonell; 11-24-2005 at 02:36 AM.
 
Old 11-24-2005, 02:54 AM   #13
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by kolonell
1 ) It doesn't really matter which Slashes they are (I tried to replace \ with / and it worked too )

2 ) about the auto,user options
auto means that it will mount automatically (eg at boot time) and user means that
an user can mount the share (if you want to know more about different options --> man fstab )
Alright, the code you give me was the following:
Code:
 //servername/sharename ~/share smbfs username=windowsuserename,password=windowspassword 0 0
Shouldn't that be:
Code:
 //servername/sharename ~/share smbfs auto,username=windowsuserename,password=windowspassword 0 0
So with "auto" added to it to mount it automaticly at boottime?

About the "user" option: why would you want to add that if the share gets mountend automaticly anyway?

Quote:
Originally posted by kolonell
I can see How this was confusing ... sorry about that
No problem I like to learn as much as possible!
 
Old 11-24-2005, 06:17 AM   #14
kolonell
LQ Newbie
 
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
hmm ...

good question . My first thought is that when the internet connection is down on boot you would be able to mount it when logged in and Internet up and runnig (with mount /mnt/share).

This is just a guess. I'm not sure but it seems a logical conclusion :-)
 
Old 11-26-2005, 06:40 AM   #15
p41elvis
Member
 
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62

Original Poster
Rep: Reputation: 15
Alright, I've tried it out, this is my fstab:
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/hda1 / ext3 noatime 1 1
/dev/hda6 /home ext3 noatime 1 2
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-15,sync,codepage=850,noauto,ro,exec,users 0 0
//ephyra.jesdesign.nl/jdhd ~/jdhd smbfs auto,username=p41elvis,password=xxxxxx 0 0
(the password is whiped out for obvious reasons)

I figured this would automatically mount the jdhd-share at boot time. When I go to ~/jdhd I get an empty directory. Is there somewhere where I can check what went wrong during boottime?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting across network steve007 Linux - Newbie 4 09-08-2005 06:53 AM
network mounting steve007 Linux - Newbie 6 07-05-2005 01:37 PM
network mounting steve007 Linux - Networking 1 07-04-2005 06:24 AM
mounting across network vivekitbhu Linux - General 3 04-05-2005 04:02 PM
network mounting? doublefailure Linux - Software 1 03-02-2003 04:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration