LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-16-2007, 02:52 PM   #1
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Rep: Reputation: 15
Mount shared folder with fstab - need help


My problem right now is that fstab mounts shared windows folders before the Wireless connection is established.


Is there any way to create a delay for these shared folders to mount? Or tell fstab to wait for network connection?

That creates a problem for when there are other users who want to access shared folders and need sudo password to perform "mount -a" operation.

Is there any way to fix this ?

Also, what do the Zeros "0 0" mean at the end of the lines like this one:

//192.168.1.10/windowshare /mnt/winshare smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0

Last edited by robertpolson; 01-16-2007 at 02:58 PM.
 
Old 01-16-2007, 03:48 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
i would *VERY* strongly suggest you look at autofs, which mounts the filesystems on access, not on boot. especially with network dependent file systems, when you have network issues, i.e. you trip over a cable, your boxes can often hang trying to read from a drive mapped over a LAN. if you use autofs it'll unmount after periods of inactivity so things like that can't happen either.
 
Old 01-16-2007, 04:11 PM   #3
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Ok, thank you. I will Google and research on how to use it.

I will post back.

Last edited by robertpolson; 01-16-2007 at 06:22 PM.
 
Old 01-16-2007, 07:24 PM   #4
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
So far, reading the guides I am confused on how to mount the shared folders?

I currently have this in my fstab

//192.168.1.7/F /media/battlestation/F smbfs dmask=777,fmask=777 0 0

where do I add this line into autofs ?

auto.master or auto.net ??

Being A Linux noob and just installing it, I am confused looking at this guide:

http://freespace.sourceforge.net/gui...to/autofs.html

or this

http://gentoo-wiki.com/HOWTO_Auto_mo...ystems_(AUTOFS)

Help.

P.S. what is automount command ? Can it be used instead? What is the difference between the two ?

Last edited by robertpolson; 01-16-2007 at 07:43 PM.
 
Old 01-17-2007, 09:40 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
check the samba example twoards the bottom of this page. http://www.linux-consulting.com/Amd_.../autofs-5.html
 
Old 01-17-2007, 12:04 PM   #6
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Still looks confusing.

All I want to know is where do I put in this line to auto mount:

//192.168.1.7/F /media/battlestation/F smbfs dmask=777,fmask=777 0 0

?
 
Old 01-17-2007, 12:27 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
you don't put it anywhere. that's an fstab line, not an autofs line. hence me providng link to an example.
 
Old 01-17-2007, 01:52 PM   #8
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Please clarify this, as I am a total noob in all of this.

As I understand:

auto.master - contains the mount points to where the directory will be mounted. Say for example:

/media/battlestation/F auto.battle



Where

auto.battle must contain what in order to mount 192.168.1.7/F


??
 
Old 01-17-2007, 02:00 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
auto.master defines which directories are to be managed by autofs, and which file to use to refernce potential mount points within that directory. so *IF* you wanted to access /media/battlestation/F then autofs.master defines the fact that you wish to manage to locations underneath /media/battlestation, yes. so as in the example link i gave you, you'd need an equivalent entry like "F -fstype=smbfs,dmask=etc... ://battlestation/F"
 
Old 01-17-2007, 02:13 PM   #10
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
So in auto.master I will add this

/media/battlestation/ /etc/auto.battle

meaning that autofs will manage this directory.

[Where inside /media/battlestation/ there is an "F" folder]





and in auto.battle

I will add this line:


F -fstype=smbfs,dmask=777.fmask=777 ://192.168.1.7/F



Is this correct ?
 
Old 01-18-2007, 05:03 PM   #11
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
The above configuration did not help. Doins as I wrote above does not mount the shared folders.

Anyone, any help ?

Last edited by robertpolson; 01-18-2007 at 05:51 PM.
 
Old 01-18-2007, 05:07 PM   #12
kgd35s4wbxzrn08
Newbie
 
Registered: Jan 2007
Posts: 16

Rep: Reputation: 0
Thank you very much for your helpful replies acid_kewpie.
 
Old 01-18-2007, 10:08 PM   #13
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
What happens now is that it looks like

auto.master is running auto.battle script fine [auto.battle being the one I created myself)

What I cannot understand is what to put into the auto.battle file so that it will mount my samba share ?

Is this exact command the correct one for me?

Quote:
F -fstype=smbfs,dmask=777.fmask=777 ://192.168.1.7/F
and in the
Quote:
auto.master
should I have

this:

Quote:
/media/battlestation/F auto.battle
or this:

Quote:
/media/battlestation/ auto.battle
 
Old 01-19-2007, 01:41 AM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
the auto,.battle entry looks fine, from what i'm aware of. the master would be the latter of your two options.
 
Old 01-19-2007, 07:00 PM   #15
robertpolson
Member
 
Registered: Feb 2006
Posts: 48

Original Poster
Rep: Reputation: 15
Ok, so far this seems to work but only for me - the user name that I use to log in, the one that was created when I initially installed Kubuntu.

The problem that I have with this setup is that other users cannot access these shared folders.

Only after I access these shared folders via my account, they appear to be working if I log out and log in into another account/

Does autfos also works and starts automatically for other users? Is there anything else I need to configure?
 
  


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
How can I mount a Windows XP shared folder? mlse Linux - Networking 3 09-28-2006 06:36 AM
how to mount windows shared folder as normal user lucasm Linux - Software 4 09-28-2006 06:14 AM
I can not open the user folder in home and write in a shared folder jorge_ivan Linux - General 8 08-02-2006 11:28 AM
how can i move this folder of music from /root/Shared to /home/coffee/Shared ? thx mr_coffee Linux - Newbie 9 01-23-2006 06:50 AM
smbfs, fstab, spaces in the folder i want to mount. Problems! JapanFred Linux - Networking 1 12-29-2005 03:27 PM

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

All times are GMT -5. The time now is 11:15 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