Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
11-23-2005, 02:03 AM
|
#1
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Rep:
|
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
|
|
|
11-23-2005, 03:52 AM
|
#2
|
Member
Registered: Oct 2005
Location: Germany
Distribution: Suse
Posts: 134
Rep:
|
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
|
|
|
11-23-2005, 04:50 AM
|
#3
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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.
|
|
|
11-23-2005, 06:29 AM
|
#4
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
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
|
|
|
11-23-2005, 06:32 AM
|
#5
|
Member
Registered: Oct 2005
Location: Germany
Distribution: Suse
Posts: 134
Rep:
|
Hi,
look for the file smbfstab where your smb.conf or is located.
You should also have a look at the documentation
HTH
|
|
|
11-23-2005, 06:39 AM
|
#6
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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.
|
|
|
11-23-2005, 06:40 AM
|
#7
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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.
|
|
|
11-23-2005, 10:35 AM
|
#8
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
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 )
|
|
|
11-23-2005, 10:55 AM
|
#9
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
And what will happen when I startup the laptop where this code is in the fstab without an internet connection? Does it corrupt anything?
|
|
|
11-23-2005, 12:25 PM
|
#10
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
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 ;-)
|
|
|
11-24-2005, 01:47 AM
|
#11
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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?
|
|
|
11-24-2005, 02:34 AM
|
#12
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
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.
|
|
|
11-24-2005, 02:54 AM
|
#13
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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! 
|
|
|
11-24-2005, 06:17 AM
|
#14
|
LQ Newbie
Registered: Sep 2005
Location: Sweden Or Belgium
Distribution: Gentoo
Posts: 10
Rep:
|
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 :-)
|
|
|
11-26-2005, 06:40 AM
|
#15
|
Member
Registered: Apr 2004
Location: Rotterdam
Distribution: Mandriva 2006 Community Edition
Posts: 62
Original Poster
Rep:
|
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?
|
|
|
All times are GMT -5. The time now is 09:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|