Announcement

Collapse
No announcement yet.

[SOLVED] smbmount - could not find target server & permission denied

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] smbmount - could not find target server & permission denied

    I have been trying to use the smbmount command since I upgraded to Hardy. I've read probably hundreds of posts, and I see that many others are having similar problems. Finally, I found something that worked, and I want to share it with others. I hope no one minds that I started this new thread - there were just too many questions out there, and I didn't want this info to get lost in the shuffle.

    Here are the steps I took to get smbmount to work on my systems.

    1) Make sure the following package are installed:

    - samba
    - smbfs
    - winbind

    2) Edit the file /etc/nsswitch.conf, changing the line that reads

    hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

    to

    hosts: files wins mdns4_minimal [NOTFOUND=return] dns mdns4

    Between installing winbind and putting this line in the nsswitch.conf file, Samba on Kubuntu is able to find the Windows share (i.e., it solved the "could not find target server" error).

    3) Restart samba with the following command:

    $ sudo /etc/init.d/samba restart

    4) Create a credentials file with your user name and password:

    $ echo "username=myid
    password=mypassword" > $HOME/.smbmount

    ** BE SURE NOT TO PUT SPACES BEFORE/AFTER THE EQUALS SIGN. That's what kept causing my error 13 - permission denied; I had spaces in there. Ugh!

    5) Don't forget to change the security of the credentials file so only you can see it.

    $ chmod 600 $HOME/.smbmount

    6) Finally, mount the Samba share.

    $ sudo smbmount //windowsservername/windowsharename $HOME/mymountpoint -o credentials=$HOME/.smbmount

    Note that I am using the default /etc/smb.conf file that came with the install. You may need to change the workgroup or other settings in this file so it matches your Windows settings. You may also want to add some other options to the smbmount command such as uid= or gid=. If you do make changes, don't forget to restart Samba.

    #2
    Re: [SOLVED] smbmount - could not find target server & permission denied

    This worked perfect for me.

    What do I need to add to my fstab file to get it to automount like this at startup?

    Thanks in advance.

    Comment


      #3
      Re: [SOLVED] smbmount - could not find target server & permission denied

      Sorry, dsk, I didn't have notification turned on for this post, so I didn't know that you wrote.

      Most of my world is Linux, so my use of Samba shares is rare. I wish I could help, but I'm not really sure how to set these things up in fstab for a Windows share.

      Additionally and unfortunately, with a recent Kubuntu update, presumably to one of the samba packages, the solution I offered above has stopped working, and I'm now again searching for a solution.

      Comment

      Working...
      X