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

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 12.04 Precise Pangolin

    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
    6

    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

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
  •