smbmount boot in fstab
I have a problem with mounting a smb drive automatically by adding it to fstab. I know the reason is because it si trying to write to mtab, but it isn't allowed.
Firstly right now I'm manually mounting the share with this command:
I found that I need to do the -n flag, which explicitly says to not write to the mtab 'for distros that have mtab as readonly'.
sudo smbmount //myserver/myshare /home/user/myshare -n -o credentials=/root/.smbcredentials,uid=user,umask=000
So when I type the identical command as above but omitting the -n I get this error:
Now I can't figure out how to set the -n flag inside my fstab when trying to do the automatic mount.
can't get /etc/mtab lock filesmbmnt failed:1
here is my fstab:
and upon reboot it still has same mstab problem.
//myserver/myshare /home/user/myshare smbfs auto,credentials=/root/.smbcredentials,uid=user,gid=user,fmask=0777,dmask=0777 0 0
Any Help please?
Seems weird that you have a read-only mtab. I'd just fix that...
Otherwise, you'll have to find where it's doing `mount -a' in your init scripts. You didn't mention what you're running, but on mine (ubuntu) it's /etc/init.d/mountall.sh.
im using xandros. However my other desktop has ubuntu and when I put the command in fstab it works perfectly fine. So its an xandros distro thing. I'll check the permissions on mtab, but I don't know if that will work.
Right, this is the Xandros forum. *blushes*
That's what I get for just clicking the unanswered link. :-)
Here's what it should look like:
$ ls -al /etc/mtab
-rw-r--r-- 1 root root 696 2007-11-23 08:42 /etc/mtab