cifs mount problem

I want to mount shared network drive using cifs mount. I have made entries in /etc/fstab but the drive does not mount on startup. Once the PC has started, I run mount -a as root and the drive mounts. This tells me that the fstab entry is correct and it is just a matter of when the mount is run during boot process. I aslo tried _netdev option but no success.

I also tried putting mount -a in boot.local but no luck. How do I resolve this issue? OpenSuSE 11.


Here’s a workaround: Open a console, su to root, enter crontab -e. That opens a root cron editor. Insert the following line:

@reboot sleep 10;mount -a

A cron job will run 10 seconds after you boot and its command (mount -a) should mount the share.

Thanks very much. The solution works. I did see this on your website Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE but could not figure out what exactly you meant. Now it is clear.

Thanks again…

Glad it works. I’ll check the website and make it clearer.

BTW have you gone over to the thread where we choosing our tags to go with posts. Follow my sig if u haven’t.

I have Linux Suse 10.3 and I used all of the commands that you mentioned and it shows up with a network drive under my computer, but when I try to access it, it says I don’t have permission to access it. Says the same thing even if I’m logged in under root.

Hello timachu1, welcome to the Forums.
It’s very hard for me to figure out what’s wrong without more information. Your Linux macine/s could be the server and/or could be the client. It seems the client is Linux though I’m not certain. Please tell me:

  1. is the server running windows or Linux
  2. is the client running windows or Linux
  3. if the server is running Linux, please post the Samba config file (smb.conf) for the server
  4. if the server is running Linux, please post the permissions and owner of the shared directory (like this: owner = billybob; permissions = drwx–x–x or whatever)
  5. if the server is running Linux please post the response you get to this command: sudo pdbedit -L
  6. if the client is running Linux please post the line in fstab in the client that you use to mount the share

My linux machine is the client. I’m trying to mount a drive that’s on the server which is Windows. I used the command in fstab at the very end I put // /home/capdam/mount_point2 username=art3,password=abc1234?,_netdev,uid=capdam,gid=users 0 0

Thanks for a quick response. I have 6 Linux machines I need to do this for, and every one I’ve spoken to so far doesn’t know how to do it. It worked just fine with smbfs, but software required me to update Linux to 10.3 and it uses cifs and I have no idea how to do it now.

fstab needs a blank line at the end. Check there is a blank line as last line.

What do you see when you open the directory /home/capdam/mount_point2? Do you see the files shared from the windows server?

The credentials username=art3 + password=abc1234? are the login user and password of the windows owner of the share (probably it is – just mention in case).

Can you browse to the shared files using Samba i.e.Nautilus-or-Konqueror and exactly this address in the address bar:

If I enter the mount command through konsole it works just fine and connects. When I enter the line // /home/capdam/mount_point2 cifs username=art3,password=abc1234?,_netdev,uid=capdam ,gid=users 0 0
, I go to my shared mount_point2 it doesn’t access the windows server. Yes those are the user name and password for the windows machine. capdam is the user for the Linux. I’ll try the blank line thing, I didn’t know it needed a blank line at the end.

I tried the blank line at the end of fstab and I tried the user and password for the Windows machine that didn’t have a question mark at the end. That didn’t work either. So I’m not sure what to do.

This is an important clue:

If I enter the mount command through konsole it works just fine and connects.

Can you please show me the “mount command”, it might be something like this:

mount -t cifs -o username=art3,password=abc1234?
// /home/capdam/mount_point2

And I need to know the answer to this too, which I asked earlier but perhaps was not clear in my question:
Don’t use the cifs mount but instead use this address in Konqueror:
Can you see in Konqueror the files on windows server?

And one more thing please: boot up and when the mount fails wait 30 seconds, open Konsole, su to root and then enter this command:

mount -a

Does that work?

I tried opening it through konqueror like you said and it asked for a user name and password. It did open after I entered those things though.

What may interest you and make more sense is that when I tried the mount -a command it said “mount error 113 = No route to host”

Thank you so much! I finally got it to work. I messed up a line the last time around, so what I tried didn’t work, but I corrected the line and thanks to you it works! You were a great help! I’ve been trying to solve this for a long while now.

Great news. Glad it worked! Perseverance pays

I have one more question, and it’s probably answered some where but I haven’t found it. Can I mount a Windows 98 network drive that does not have a username and password? If so how? I tried typing in the command in the console with the windows 98 machine info in place of the XP machine and it asks for a password so I hit enter and it says “no such file or directory.”

For 98 it looks like this:

mount -t cifs //   /mnt -o user=gwendolyn,sec=lanman,servern=SERVERNAME

Note use upper case for SERVERNAME

Thank you that worked perfect for the konsole, but will that work for fstab too or is there a different command for that?

Guessing. Try editing something like this into fstab:

// /path_to/mount_point cifs username=gwendolyn,sec=lanman,servern=SERVERNAME,_netdev,uid=capdam,gid=users 0 0

I entered that line, with my info inserted and it didn’t show up as a share at all so, I tried again and added cifs to it. Then it showed up, but still will not allow me access. I checked and rechecked to make sure my info was right. I’m close though. Thank you for your help on this, it’s greatly appreciated.