Samba Shares Using AutoFS

Discussion in 'HOWTO-Related Questions' started by Frankly3D, Jul 12, 2007.

  1. Frankly3D

    Frankly3D New Member

  2. falko

    falko Super Moderator Howtoforge Staff

    In the tutorial you have the line
    Code:
    mountopts="-fstype=cifs,file_mode=0644,dir_mode=0755,uid=[B][COLOR="Red"]user[/COLOR][/B],gid=users"
    Replace user with your actual username.
     
  3. ustoopia

    ustoopia Member

    I'm also having some problems using AutoFS from Debian Etch
    I followed the tutorial from http://www.howtoforge.com/accessing_windows_or_samba_shares_using_autofs

    I hope somebody notices what I did wrong. Here's what I did:

    I created a user (for example: User4) on the win2003 machine. I created a dir and shared it (for example: C:\Share) granting the User4 full read+write access, also under the security tab.

    I created /etc/auto.cifs and placed the script mentioned on the page above in there. I replaced uid=user with uid=User4

    I created /etc/auto.smb.WINBOX and also /etc/audo.smb.WINBOX.DOMAIN.LOCAL and in both files I added:
    Code:
    username=User4
    password=secret
    When I run ls -als /cifs/WINBOX then I get to see all my share dirs on the windows machine. But when I run ls -als /cifs/WINBOX/Share it says: No such file or directory. And at the same time the console from wich I run the command is showing:

    Code:
    CIFS VFS: cifs_mount failed w/return code = -22
    CIFS VFS: No username specified
    When I noticed that it didn't work I also tried using the script that was edited by davek (also mentioned on the same page) that looked like this:

    Code:
    $SMBCLIENT $smbclientopts -gL $key 2>/dev/null \
       | awk -v key="$key" -v opts="$mountopts" -F'|' -- '
            BEGIN   { ORS=""; first=1 }
            /Disk/  { if (first) { print opts; first=0 };
                      gsub(/ /, "\\ ", $2);
                      sub(/\$/, "\\$", $2);
                      print " \\\n\t /" $2, "://" key "/" $2 }
            END     { if (!first) print "\n"; else exit 1 }
            '
    Same results though :-(
    Any ideas?
     

Share This Page