Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: mount error: could not resolve address for Diskstation: Unknown error

  1. #31
    Join Date
    Jul 2011
    Beans
    14

    Re: mount error: could not resolve address for Diskstation: Unknown error

    So I tried this before mounting:
    Code:
    sudo touch /media/phoenix/test.txt
    and file is there:

    Code:
    ls -la /media/phoenix/
    total 8
    drwxr-xr-x  2 root root 4096 Nov 15 23:38 .
    drwxr-xr-x 10 root root 4096 Nov 12 23:25 ..
    -rw-r--r--  1 root root    0 Nov 15 23:38 test.txt
    After mounting:

    Code:
    ls -la /media/phoenix/
    total 8
    drwxr-xr-x  2 root root 4096 Nov 15 23:38 .
    drwxr-xr-x 10 root root 4096 Nov 12 23:25 ..
    -rw-r--r--  1 root root    0 Nov 15 23:38 test.txt
    And file is still there.

  2. #32
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: mount error: could not resolve address for Diskstation: Unknown error

    Quote Originally Posted by MonoAM View Post
    So I tried this before mounting:
    Code:
    sudo touch /media/phoenix/test.txt
    and file is there:

    Code:
    ls -la /media/phoenix/
    total 8
    drwxr-xr-x  2 root root 4096 Nov 15 23:38 .
    drwxr-xr-x 10 root root 4096 Nov 12 23:25 ..
    -rw-r--r--  1 root root    0 Nov 15 23:38 test.txt
    After mounting:

    Code:
    ls -la /media/phoenix/
    total 8
    drwxr-xr-x  2 root root 4096 Nov 15 23:38 .
    drwxr-xr-x 10 root root 4096 Nov 12 23:25 ..
    -rw-r--r--  1 root root    0 Nov 15 23:38 test.txt
    And file is still there.
    This means the share is not being mounted. The file would be obscured with the share mounted at /media/phoenix.

    Normally I would make the mount point (/media/phoenix) be owned by a group that all users can use. Ubuntu has a group that does just this for Samba. It is called sambashare. You should already be a member. You can check with this command
    Code:
    getent group |grep sambashare
    ... you should be in that group.

    To change the group ownership of the mount point we should use this command
    Code:
    sudo chgrp sambashare /media/phoenix
    ... check it using
    Code:
    ls -ld /media/phoenix
    Now lets change the permissions on that mountpoint so you will have access
    Code:
    sudo chmod 775 /media/phoenix
    Use this incantation to mount the share
    Code:
    sudo mount -t cifs //PHOENIX/hitachi  /media/phoenix -o username=amguerra
    I notice your login is alfredo but your valid user is amguerra. This may be part of the problem. You need to be consistant in naming. My local login and my share login are the same on all of my machines.

    I have tested this on my network (using my server and share names). I even used the mount point /media/phoenix. It works as expected so you should have no problems mounting the share.
    Last edited by bab1; November 16th, 2012 at 03:13 AM.
    -BAB1

  3. #33
    Join Date
    Jan 2010
    Beans
    22

    Re: mount error: could not resolve address for Diskstation: Unknown error

    Hi guys,

    I also continued my journey. Maybe I can help with my results & solutions.

    MonoAM, Bab1 mentioned it in message #15, but maybe a WINS server might fit your needs. I never knew what a WINS server was until last week. If I understand it correctly, it is some kind of DNS server for the NetBios protocol.

    Here I found a page where they describe how to setup a WINS server.

    I also created a small script to work around the error, called namelookup.sh:

    Code:
    #!/bin/sh
    nmblookup $1 | grep "$1<00>" | cut -d" " -f0
    And I call the script like this:
    Code:
    mount -t cifs //$(./namelookup.sh phoenix)/disk samba
    But as I said, it's only a work around.

    For me the journey ends here, since I discovered that the software of my Synology NAS has a mounting option which can resolve samba/netbios names. So my problem is solved.

    I hope this info could be of any help.

    Success,

    alfons

  4. #34
    Join Date
    Jul 2011
    Beans
    14

    Re: mount error: could not resolve address for Diskstation: Unknown error

    Hi there,

    Sorry for the delay in replying.

    Bab1: I tried your commands but they didn't work out. Here are the commands and the output:

    Code:
    ls -ld /media/phoenix
    drwxr-xr-x 2 root sambashare 4096 Nov 15 23:38 /media/phoenix
    
    sudo chmod 775 /media/phoenix
    
    sudo mount -t cifs //PHOENIX/hitachi  /media/phoenix -o username=amguerra
    mount error: could not resolve address for PHOENIX: Unknown error
    Quote Originally Posted by bab1 View Post
    I notice your login is alfredo but your valid user is amguerra. This may be part of the problem. You need to be consistant in naming. My local login and my share login are the same on all of my machines.
    Yes, I know, this is a bit of an inconsistency on my part. Basically, my username on phoenix is amguerra whilst on my main computer (the client) is alfredo. That's why I need to connect as a different user on the share. Now, in theory that shouldn't be a problem. But yes, it's not ideal.

    Alfons: Your workaround worked like a charm! Yes, it's just a workaround but it works and it's dynamic. So, I think I'll use that for now at least. Ideally I would like to make this thing work properly, but there doesn't seem to be a solution, or at least it's not obvious. Looks like it's one of those Ubuntu glitches that just occur for some reason and unless you are willing to spend A LOT of time you'll have to learn with it. And well, Alfons' workaround works fine for the time being.

    Thanks a lot guys for your help!!!

    P.S. Alfons: I had to correct the line of your script to this:
    Code:
    nmblookup $1 | grep "$1<00>" | cut -d" " -f1
    got an error message from cut saying that "fields and positions are numbered from 1".

  5. #35
    Join Date
    Jul 2010
    Location
    Arizona
    Beans
    68

    Re: mount error: could not resolve address for Diskstation: Unknown error

    I had the same error mounting a share on my NAS from command line using cifs - I installed winbind and edited /etc/nsswitch.conf like so... hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4 This worked for me.
    "Linux - isn't that the kid with the blanket fetish from the Peanuts comic strip?"

  6. #36
    Join Date
    Sep 2009
    Beans
    7

    Re: mount error: could not resolve address for Diskstation: Unknown error

    I've lost a lot of time to make ubuntu (kubuntu) cifs working with android's samba file sharing.
    It works great with Krusader, but not with cifs.utils. Forum does help, but not in one place.
    So I've put it all together here. Maybe it will be useful for someone else.

    My errors messages was:
    mount error: could not resolve address for SGN3: Unknown error
    cifs_mount failed w/return code = -5
    cifs_mount failed w/return code = -111
    cifs_mount failed w/return code = -112


    I've fixed it with this changes:

    1. /etc/samba/smb.conf:
    name resolve order = bcast

    2. /etc/nsswitch.conf
    hosts: files wins dns

    3. /etc/fstab
    //SGN3/sdcard /home/sergey/pda cifs username=sergey,uid=sergey,user,sec=ntlmv2 0 0

    And now it works as expected:
    (ku:~)$ mount pda
    Password for sergey@//SGN3/sdcard:
    (ku:~)$ umount pda

  7. #37
    Join Date
    Sep 2014
    Beans
    1

    Re: mount error: could not resolve address for Diskstation: Unknown error

    Quote Originally Posted by bab1 View Post
    At this point it appears there is no DNS resolution. We do have NETBIOS resolution because nmblookup works. All Ubuntu hosts resolve hostnames by first looking in the hosts file. If therre is no mapping then DNS is tried. We can see if a hostname mapping in /etc/hosts works by mapping the host diskstation to the IP address in /etc/hosts like this
    Code:
    127.0.0.1    localhost
    127.0.1.1    alfons-laptop
    
    # Temp mapping of Diskstation to its IP address
    192.168.0.2  diskstation
    ...If this works, it confirms that you do not have local DNS name services working.

    Try to mount the share via //diskstation/share We shall see what happens with the temp config in your /etc/hosts file. This is only a test right now.

    This solution worked for me, thanks a lot.

    I had the same problem, added that line to /etc/hosts and worked perfectly. But I'm afraid that if my computer changes ip it will stop working since it's hardcoded into the /etc/hosts. Do you know how to correct this?

    Thanks!

  8. #38
    Join Date
    Jun 2014
    Beans
    26
    Distro
    Lubuntu 14.10 Utopic Unicorn

    Re: mount error: could not resolve address for Diskstation: Unknown error

    You are only accessing the NAS locally, right? Do you have a router? If that is the case, then you can find out how to make your router give a "static" DHCP address to the NAS. After doing that, then you can either update /etc/hosts to match the assigned IP from the router, or have the router give a hostname to the NAS so that you can access it from other devices without editing their hosts file (if even possible, e.g., iPad).

    I should be able to help with the router setup as long as I know which one it is.
    Last edited by JohnnyComeL8ly; September 15th, 2014 at 09:14 PM.

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Bookmarks

Posting Permissions

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