Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mounting a windows share on a linux machine...

Status
Not open for further replies.

shadedecho

Programmer
Oct 4, 2002
336
US
I am able to issue the following command at the prompt on my linux (fedora 2) machine:

smbmount //servername/sharename /mountpoint -o credentials=/path/to/credentials.file

It works great.

However, I then decided to try to make this automount on boot. There are a number of ways to do this as I've found... one is to put it in /etc/fstab, like

//servername/sharename /mountpoint smbfs credentials=/path/to/credentials.file

When I did this, and rebooted, during boot when it processes the fstab file, it gave an error about "no route to host" which I found odd. But then I realized that the boot order was not loading "SMB services" until way after this fstab process, so I imagine that may have been the problem, and even if not, then it would most likely be a subsequent problem, since that would require SMB to be started i imagine.

I'm not sure how to move SMB Services to start before fstab is processed. But it seems like this must be possible, since fstab does have the ability to specify a network share name over samba in it.

In any case, I then moved on to trying to specify the "smbmount" command directly, in the rc.local file. I know this file is executed last during bootup, so I assumed it would ensure that the mount wasn't done until after the SMB services were good and started.

To my dismay, on reboot, i got no boot up errors, nor did i get any errors (or confirmations) listed in /var/log/messages. And furthermore, the share appears to not have been mounted, because I go to the mount point directory, and the contents are not there like they should be. I then issue the command, and it works just fine, and the contents are there then.

So... what am I missing? why can't i mount this share during boot? any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top