Results 1 to 4 of 4
Ok,
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 ...
- 11-20-2007 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 14
smbmount boot in fstab
Ok,
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'.Code: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.Code:can't get /etc/mtab lock filesmbmnt failed:1
here is my fstab:
and upon reboot it still has same mstab problem.Code://myserver/myshare /home/user/myshare smbfs auto,credentials=/root/.smbcredentials,uid=user,gid=user,fmask=0777,dmask=0777 0 0
Any Help please?
- 11-23-2007 #2Just Joined!
- Join Date
- Nov 2007
- Location
- Camp Pendleton
- Posts
- 55
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.
- 11-23-2007 #3Just Joined!
- Join Date
- Nov 2007
- Posts
- 14
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.
- 11-24-2007 #4Just Joined!
- Join Date
- Nov 2007
- Location
- Camp Pendleton
- Posts
- 55
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:
Code:$ ls -al /etc/mtab -rw-r--r-- 1 root root 696 2007-11-23 08:42 /etc/mtab


Reply With Quote