Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Can not access Windows shares

  1. #1
    Join Date
    Mar 2013
    Beans
    29

    Can not access Windows shares

    When I was evaluating ubuntu 12.1 with the LiveCD I was able to access shares on my Win7 machine. Now with ubuntu fully installed I can not...I get a "Failed to mount windows share" error.

    I've tried to follow various guides on the forums but have gotten nowhere. Running smbtree in a terminal window shows

    WORKGROUP
    //DAMBOMB

    I've turned off the Win7 HOMEGROUP feature. Using the Home Folder and Browse Network shows the shares but I can't connect with the aforementioned error.

    Any suggestions?
    TIA,
    Randy
    Last edited by RandyN; March 23rd, 2013 at 06:16 PM.

  2. #2
    Join Date
    Jun 2008
    Location
    South Africa
    Beans
    39
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Can not access Windows shares

    Is the share you are trying to connect to on a computer connected to a Windows Domain?

    In Nautilus (assuming you are using Nautilus) try going to File -> Connect To Server, then select Windows share. If you are connecting to a computer that's on a Windows domain make sure you type the domain in ALL CAPS.

    EDIT:
    Also now that I've thought of it have any configurations changed since your live cd session? Can you ping your Windows box from you linux box?
    Last edited by solarghost; March 16th, 2013 at 01:49 PM.

  3. #3
    Join Date
    Mar 2013
    Beans
    29

    Re: Can not access Windows shares

    I was able to connect to the windows box via the path you mentioned but it still failed to mount the share. I'm not sure about being able to ping (on my win7 pc atm).

    On the LiveCD the wired network connection was not working but the wireless adapter was and once installed the Ubuntu machine used the wired connection. Didn't really take notice of that until you asked about a change up in configuration. Maybe there in lies a hint.

    What I ended up doing was a 'reverse' share. I had initially tried to install samba through the terminal (most online suggestions use the terminal for installing stuff) but ended up with an error message. After a bit more reading I installed Samba using Software Center and sharing the folder on the ubuntu machine. I had no problems seeing that share from the windows pc and was able to drag the files I needed to it that way.

    I'll have to satisfy myself with that for now but if you have an idea about why the wireless connection worked for shares over the wired one I'd be interested to hear as I will be attempting this again at some point.

  4. #4
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Can not access Windows shares

    Well, you really need to check some things if you want to understand what's happening. First of all, can you can ping the Windows machine by its host name? If not, you probably want to use some sort of name resolution (e.g. Avahi/Bonjour).

  5. #5
    Join Date
    Mar 2013
    Beans
    29

    Re: Can not access Windows shares

    Ok...I can not ping the host name (tried in ALL CAPS and Proper Case) but I can ping the (static) IP address. I can ping our ISP hostname.

    The two machines are connected by a switch (and a pfsense router also connects to the switch but does not sit between the two pc's).

    Personal File Sharing is installed and I just installed Avahi Zeroconf Browser.

    I don't know if this makes a difference but the Win7 machine is set to a static IP and not a DHCP assigned address whereas the Ubuntu 12.1 machine is DHCP. Our iPad (also DHCP) shows up in the Avahi Discovery screen but so far no Win7 which seems odd since I can see the shares via Nautilus (just can't mount them).

  6. #6
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Can not access Windows shares

    Quote Originally Posted by RandyN View Post
    I can ping the (static) IP address
    If you use static IPs, you can simply edit hosts file. In Linux it's /etc/hosts, in Windows it's %windir%\system32\drivers\etc\hosts. Format: ip-address hostname. Example:
    Code:
    192.168.0.1 myhosthame
    Last edited by prodigy_; March 16th, 2013 at 11:54 PM.

  7. #7
    Join Date
    Mar 2013
    Beans
    29

    Re: Can not access Windows shares

    Well things got a little bit stranger. I added the static IP address for the win7 machine to etc/hosts and I can now ping it by hostname but still can't mount any of the shares (I also tried to do so with the McAfee firewall(on the win7 pc) turned off).

    Now for the odd part. I have a WinXP machine (which has a dynamic IP address) on the network, which was on a different workgroup called group1. I changed it to WORKGROUP to put everything on the same group. There are two music directories shared on that machine and I can access those files and play them just fine. Oddly enough I can not access the 'SharedDocs' folder.

    To give you a better idea of the network layout:
    192.168.1.1 - pfsense router with static WAN IP plugged into a
    gigabit switch which then has plugged into it
    192.168.1.2 - wireless access point
    192.168.1.3 - win7 machine (contains videos and photos). The win7 pc can see the ubuntu share setup with Samba.
    I have the router assign dynamic addresses to the kids machines 192.168.1.100 - 192.168.1.125 so I don't have to mess with static ip's when they come to visit.

    Thanks for the input so far...very much appreciated.
    Last edited by RandyN; March 17th, 2013 at 01:41 AM.

  8. #8
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Can not access Windows shares

    Need to do some more diagnostics. Try these command (from the Linux box):
    Code:
    smblient //name/share -u username # substitute actual machine, share and user names
    If you get no error, quit and proceed to:
    Code:
    sudo apt-get install cifs-utils
    sudo mount -t cifs //name/share /mnt -o workgroup=WORKGROUP,user=username
    If this also works, unmount with:
    Code:
    sudo umount /mnt
    and make this a permanent solution via /etc/fstab as described here.

    Oddly enough I can not access the 'SharedDocs' folder.
    What error message do you get?
    Last edited by prodigy_; March 17th, 2013 at 12:25 PM.

  9. #9
    Join Date
    Mar 2013
    Beans
    29

    Re: Can not access Windows shares

    Ok...you may have to dumb down that first line for me as I'm not sure I'm doing it right. I enter:
    Code:
    smbclient //name/share -u randy # dabomb,win7share,randy
    Connection to name failed (Error NT_STATUS_BAD_NETWORK_NAME)

    *edit* Light bulb goes on...everything after the # is a comment. Next post is corrected*edit*


    When I try to connect to the "SharedDocs" on the WinXP machine I get the "Unable to mount location" "Failed to mount Windows Share" error.

    I ran smbtree again and it now shows:

    WORKGROUP
    \\RADOFF
    \\RADOFF\Printer hp LaserJet 1320 PCL 6
    \\RADOFF\MP3
    \\RADOFF\OlderTunes
    \\RADOFF\SharedDocs
    \\RADOFF\print$ Printer Drivers
    \\RADOFF\IPC$ Remote IPC
    \\DABOMB
    Last edited by RandyN; March 18th, 2013 at 07:18 PM.

  10. #10
    Join Date
    Mar 2013
    Beans
    29

    Re: Can not access Windows shares

    Code:
    smbclient //dabomb/win7share -U randy%mypass
    Returned:
    Domain=[DABOMB] OS=[Windows 7 Home Premium 7601 Service Pack 1] Server=[Windows 7 Home Premium 6.1]
    and the prompt dropped to:
    smb: />

    Exited and went to next step. Already on the latest cifs-utils so went to the next command:

    Code:
    sudo mount -t cifs //dabomb/win7share /mnt -o workgroup=WORKGROUP,user=randy
    This returns:
    [sudo] password for randy: I entered my su password and it returns:
    Password: I assume this is for the share so I enter my Win7 password and it returns:

    A blinking cursor and it just sits there. After 5-10 minutes I hit CTRL+C and got dumped back to the randy@dellcore2:~$ prompt. This all took a few tries but I hope I did everything correctly. Good thing this is all in the absolute beginners section

    A bit more reading and went back a step to the smb: /> prompt and did a directory listing:
    smb: /> dir
    This returned the following error:
    NT_STATUS_IO_TIMEOUT listing \*
    smb: \> SMBecho failed (NT_STATUS_CONNECTION_RESET). The connection is disconnected now
    Last edited by RandyN; March 18th, 2013 at 08:23 PM.

Page 1 of 2 12 LastLast

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
  •