RH9 mounting SMBFS from fstab -
I know. Another SAMBA question. I promise I've read about 30 different postings on a variety of sites and tried all their recommendations, but still no luck. So here goes.
I'm running RedHat 9.0 on a Dell Latitude C800 laptop, dual booting with Win XP using Grub loader (installed in root, not MBR). There were no problems during the install and I'm pretty much a happy camper. (Haven't booted XP in weeks. :-) I have a number of SAMBA shares that I mount manually. I want to mount a couple of them at boot time. Here's the command I use to mount them manually. It works fine. mount -t smbfs -o username=admin,password=foo '//My Server/javadocs' /javadocs I've tried a dozen or so different ways to get this sucker to mount automatically when I boot. The closest I've come is with this entry in my /etc/fstab: //Meade\040Server/javadocs /javadocs smbfs auto,user=admin,password=foo 0 0 I say “the closest” because at least it doesn't tell me I have a bad line in fstab. When I run “mount -a ” I get this error: 2299: session setup failed: ERRDOS - ERRnoaccess (Access denied.) SMB connection failed So I feel I'm getting close, but still no big smiles. Have I incorrectly handled the space in the remote file share? (Wrapping it in ' ' or “ “ resulted in a bad fstab line error.) Should I be using automount instead? (If so, a pointer to explicit instructions would be helpful, because I've tried that too.) (I should mention that putting the “mount -t” statement directly in rc.local worked, but I want to do this “properly”. And that method locked up during boot time when I tried to do 4 mounts instead of just the 1.) Any help would be appreciated. Jefficus |
I think it needs to be "username=admin" rather than "user=admin".
|
That solved the ERRnoaccess problem, but it still fails during boot. Interestingly, I can now use "mount -a" after boot and it mounts just fine. Does this suggest that something is loading in the wrong order during boot? Any other ideas? I'm close now. I can feel it.
FWIW, the /var/log/messages file says this: May 28 11:51:01 localhost mount: SMB connection failed May 28 11:51:01 localhost kernel: FDC 0 is a post-1991 82077 May 28 11:51:01 localhost netfs: Mounting SMB filesystems: failed May 28 11:51:01 localhost kernel: NET4: Frame Diverter 0.46 May 28 11:51:01 localhost netfs: Mounting other filesystems: succeeded Jefficus |
Do you have SMBFS built _into_ the kernel or as a kernel module? Do the kernel modules load BEFORE fstab is processed?
Peace... |
I have no idea. How do I figure that out?
|
As root, use the "lsmod" command to see what kernel modules are loaded. If you see smbfs then you know that's being loaded as a kernel module vs being compiled _into_ the kernel itself.
Peace... |
Yup, its a module. And I suppose that means they get loaded after the file system is mounted, right?
Jefficus |
Without trying to point out the obvious - is it being mounted before you bring up your network interface?
|
Feel free to point away. Linux is making me feel stupid enough. You can't do any more damage. :-)
I've looked through /var/log/messages, but I can't find anything that suggests where the smbfs module gets loaded. What should I be looking for? And assuming that this is the problem, would I be better advised to change the loading order, or rebuild the kernel with smbfs support built in? Pros? Cons? Thanks, Jefficus |
Hi,
I've been following this thread for a while and I'm trying to auto-mount my smbfs shares in the fstab file as well. After running the LSMOD utility I have found that SMBFS does not appear in the list. Does this mean that it is not running as a kernel module? How do I make it run as a kernel module? Is that what may be keeping my persitent mounts from working correctly (assuming my syntax is correct..etc.)? Thanks |
here is how my automount is setup for smb:
//RemoteBox/SharedFolder /LinuxMountFolder smbfs username=foo,password=foo,owner,user,_netdev 0 0 only thing is, it's read only. Which I was told you want to do with this type of thing. good luck! |
Jefficus, I think I have the same problem you have or had been experiencing. Did you ever get a resolution to this? There seems to be no way to automount more than one windows share. I would love to talk to someone who has been able to accomplish this to determine their settings.
Thanks, Darryl |
dbaker> I have three windows shares automounted using the line in my previous post. Just add a line for every share to your fstab file and it should work.
slooper |
OK, Slooper, there must be something different about your linux/samba configuration than mine. I have a number of questions to ask you.
1) Which version of redhat are you running? I am running version 9. 2) Do you have smbfs compiled into the kernel or in a module. I have mine in a module. 3) You say that you need to make the win shares read-only. Did it not work with full access? Actually, I tried both and could get neither to work. 4) When I try your options smbfs reports "Unrecognized mount option noexec" at bootup point "Mounting SMB filesystems". I can't understand what could be wrong. Christ, I can automount each of the two shares alone in /etc/fstab but when I include both smbmnt fails. I wish there was some diagnostic I could run or log I could check to get some specific error message. I checked the /var/log/messages file but it just tells you if the service was successful in starting or not. I can tell that when the kernel boots up. Thanks for responding, Darryl |
dbaker>
1) redhat 8 2) mine is a module as well 3) it was working fine at one time with full access, however a linux guru that I know told me that you run the risk of file corruption when writing to NTFS through Samba 3) I get that error too, but it doesn't seem to affect my mount. It still works. :) check the mount point folders and see - maybe it worked after all |
All times are GMT -5. The time now is 08:16 PM. |