Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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:
    Code:
    sudo smbmount //myserver/myshare /home/user/myshare -n -o credentials=/root/.smbcredentials,uid=user,umask=000
    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'.

    So when I type the identical command as above but omitting the -n I get this error:
    Code:
    can't get /etc/mtab lock filesmbmnt failed:1
    Now I can't figure out how to set the -n flag inside my fstab when trying to do the automatic mount.

    here is my fstab:

    Code:
    //myserver/myshare /home/user/myshare smbfs auto,credentials=/root/.smbcredentials,uid=user,gid=user,fmask=0777,dmask=0777 0 0
    and upon reboot it still has same mstab problem.

    Any Help please?

  2. #2
    Just 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.

  3. #3
    Just 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.

  4. $spacer_open
    $spacer_close
  5. #4
    Just 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •