LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Mounting Windows share using fstab but the mount folder doesn't populate automaticall (https://www.linuxquestions.org/questions/linux-networking-3/mounting-windows-share-using-fstab-but-the-mount-folder-doesnt-populate-automaticall-803279/)

chrislski 04-21-2010 08:06 AM

Mounting Windows share using fstab but the mount folder doesn't populate automaticall
 
I have a RHEL 5.5 box which I am using the fstab to mount a Windows share automatically. I am using the below line to set up the mount.

//servername.local.domain/sharename /mnt/sharename cifs user,uid=500,rw,suid,username=adusername,password=password 0 0

This appears to work somewhat as the share shows up in the Computer location in Gnome. When you go to the /mnt/sharename directory there is nothing in it. If you open the share from the Computer location /mnt/sharename all of a sudden shows everything in the share and works like normal.

What am I missing in order to get the mount folder to show everything in the share automatically?

smoker 04-21-2010 06:41 PM

I believe the problem is that fstab happens before the network is up, so it can't mount the share properly.

_netdev option is the key, but there are other things you need to take care of, like not putting your username and password where everybody can see them.

See this post :
http://www.linuxquestions.org/questi...-fstab-667392/

chrislski 04-22-2010 06:49 AM

I was planning on following the steps here to hide the password but I wanted to get it working first.

I am off to try the _netdev option and see how it works.

chrislski 04-22-2010 08:53 AM

Even after adding -netdev I can't get it to automatically mount at the /mnt/sharename directory.

chrislski 04-22-2010 09:17 AM

Apparently netfs is required because once I enabled the service it works.


All times are GMT -5. The time now is 07:59 AM.