mounting samba shares


Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: mounting samba shares

  1. #1
    Join Date
    Mar 2005
    Location
    DE
    Posts
    140

    mounting samba shares

    I've tried smbmount, smbmnt and mount -t smbfs commands to mount some samba shares, but I get back either command not found for the first two and unknown filesystem for the last one. I though smbmount or smbmnt were part of the samba client which I do have installed. What am I doing wrong?

  2. #2
    Join Date
    Mar 2005
    Location
    DE
    Posts
    140

  3. #3
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    afaik smbfs is being deprecated, you might want to switch to the superior cifs, ie mount -t cifs or mount.cifs whatever

  4. #4
    Join Date
    Mar 2005
    Location
    DE
    Posts
    140
    actually, now I have a related question. I want to mount my shares, but 2 of the 3 I want to mount are directories containing spaces. I've tried adding them to fstab, taking the spaces into consideration but nothing works. What would the proper line in fstab to do essentially this:

    Code:
    //laptop/My Pictures   /mnt/pictures cifs user,noauto,ro 0 0
    or if there is nothing like that, how can I achieve a similar set up?
    Last edited by karasu; 09-24-2006 at 02:01 PM.

  5. #5
    Join Date
    Sep 2004
    Location
    /home/
    Posts
    1,204
    //servername/My\40Pictures

    BTW, don't use spaces in shared names.


    Soule
    Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey

    IRC #linuxn00b

    Support your Distro.
    Slackware Store
    Archlinux Schwag

  6. #6
    Join Date
    Sep 2003
    Location
    Rochester, MN
    Posts
    3,604
    I'm guessing you meant for that to be //server/My\ Pictures? Or maybe //server/My%20Pictures (not sure whether that would work anyway)?

  7. #7
    Join Date
    Aug 2001
    Location
    Somewhere, Texas
    Posts
    9,627
    Don't forget to add the credentails to the fstab for the mount
    Code:
    cd
    echo username=mywindowsusername > .smbpasswd
    echo password=mywindowspassword >> .smbpasswd
    chmod 600 .smbpasswd
    //servername/sharename /mountdirectory smbfs credentials=/home/myhomedirectory/.smbpasswd 0 0
    That's the 'proper' way of setting it up since you don't really want to keep user names and password in a world readable file

    But if you really do...
    Code:
    //servername/sharename /mountdirectory smbfs credentials=/home/myhomedirectory/. smbpasswd,uid=mylinuxusername,gid=mylinuxgroupname 0 0

  8. #8
    Join Date
    Mar 2005
    Location
    DE
    Posts
    140
    Quote Originally Posted by soulestream
    //servername/My\40Pictures

    BTW, don't use spaces in shared names.


    Soule
    If I had made the folders I wish to share, I wouldn't have used spaces. I just went with what windows gave me. I'll try that next time I get a chance. Thanks

    Quote Originally Posted by cybertron
    I'm guessing you meant for that to be //server/My\ Pictures? Or maybe //server/My%20Pictures (not sure whether that would work anyway)?
    laptop happens to be the name of the server...also, My\ Pictures and My%20Pictures are both things I've tried before I made the post. Both return as bad lines in fstab.

  9. #9
    Join Date
    Sep 2003
    Location
    Rochester, MN
    Posts
    3,604
    Hmm, can you quote it?

    "//server/My Pictures"

  10. #10
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    you can change the sharename in linux, in the properties tab, i suggest you do so even windows doesnt like those spaces in a share name

  11. #11
    Join Date
    Aug 2005
    Posts
    86
    This works for me...

    //servername/"Name of share"

    Debian/Ubuntu tested and verified...

  12. #12
    Join Date
    Mar 2005
    Location
    DE
    Posts
    140
    Quote Originally Posted by MastaShake57
    This works for me...

    //servername/"Name of share"

    Debian/Ubuntu tested and verified...
    this is in your fstab? I get a bad line in fstab error with thats in my fstab

    also, the \40 replacing the space did not work

  13. #13
    Join Date
    Mar 2005
    Location
    DE
    Posts
    140
    Quote Originally Posted by dkeav
    you can change the sharename in linux, in the properties tab, i suggest you do so even windows doesnt like those spaces in a share name
    I would do just that if that didn't then require that I update my music library and playlists to reflect the change of the directory name.

  14. #14
    Join Date
    Mar 2005
    Location
    DE
    Posts
    140
    Quote Originally Posted by cybertron
    Hmm, can you quote it?

    "//server/My Pictures"
    in fstab? no, that was my 3rd try and it returned a bad line in fstab when I tried to mount it

  15. #15
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    the foldername doesnt change in windows, just share name ie c:\blah\my music shared as music == //server/music mounted to wherever the hell you want so no changing anything on the client side

Posting Permissions

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