28

I'm trying to mount a network share from a Linksys NAS200 to Fedora 16.

The program I am trying to run won't accept network addresses to save to. I ran it without specifying the IP address of the server and it comes up with some random IP. I specified an IP and it can't find the device.

Here are the errors:

[root@HOME ~]# mount -t cifs -v //NAS_SERVER/public/ /mnt/ -o username=user,password=pass
mount.cifs kernel mount options: ip=184.106.31.190,unc=\\NAS_SERVER\public,,ver=1,user=user,pass=********
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@HOME ~]# mount -t cifs -v //NAS_SERVER/public/ /mnt/ -o username=user,password=pass,ip=192.168.1.77
ip address 192.168.1.77 override specified
mount.cifs kernel mount options: ip=192.168.1.77,unc=\\NAS_SERVER\public,,ver=1,user=user,pass=********
Retrying with upper case share name
mount.cifs kernel mount options: ip=192.168.1.77,unc=\\NAS_SERVER\PUBLIC,,ver=1,user=user,pass=********
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

But it does work with smbclient:

[root@HOME ~]# smbclient -L 192.168.1.77
WARNING: The security=share option is deprecated
Enter user's password: 
Domain=[HOME] OS=[Unix] Server=[Samba 3.0.22]

Sharename       Type      Comment
---------       ----      -------
IPC$            IPC       IPC Service (Network Storage)
DISK 1          Disk      
PUBLIC          Disk      
ADMIN$          IPC       IPC Service (Network Storage)
Domain=[HOME] OS=[Unix] Server=[Samba 3.0.22]

Server               Comment
---------            -------
HOME                 Samba Server Version 3.6.5-85.fc16
NAS_SERVER           Network Storage

Workgroup            Master
---------            -------
HOME                 HOME

Why can't I mount to this samba server? What do these errors mean?

33

Troubleshoot accessing a windows XP shared folder from Fedora:

You are receiving the error:

mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

1. Make sure Linux can ping the other box.

Run this command on the linux box to the IP of the windows box:

el@defiant /mnt $ ping 192.168.13.107
PING 192.168.13.107 (192.168.13.107) 56(84) bytes of data.
64 bytes from 192.168.13.107: icmp_req=1 ttl=128 time=0.366 ms
--- 192.168.13.107 ping statistics ---
44 packets transmitted, 44 received, 0% packet loss, time 42999ms
rtt min/avg/max/mdev = 0.178/0.227/0.366/0.038 ms

If you can't reach the box or connectivity is in and out, mount may complain.

2. Make sure a folder is actually shared on windows, follow these steps.

  1. Open the file browser to C:\.
  2. Create a new folder called public. So you now have C:\public
  3. Inside that folder, make a new text document called "testing.txt".
  4. Right click the folder C:\public and go to properties.
  5. Click the sharing tab.
  6. Make sure: "Share this folder on the network" is checked. Note the share name: 'public'.
  7. Click ok. A little hand should appear underneath the folder, meaning it is shared.

The folder 'public' is now shared and you should be able to connect to it with Linux.

3. On Linux, mount the share with 'mount':

  1. Open a console and su to root.
  2. make a directory mkdir /mnt/windows This will be where you access the shared files.

  3. run the mount command which prompts for a password:

    [root@defiant mnt]# mount -t cifs //192.168.13.107/eric /mnt/windows -o username=eric
    Password for eric@//192.168.13.107/public:  **********
    [root@defiant mnt]# 
    
  4. The above command prompts you for a password, enter the correct password, an incorrect one will produce an error. If you are unsure of the password, you can change the password on the windows box under Control Panel -> User Accounts.

  5. run the command cd /mnt/windows and run ls. The contents of the drive are presented:

    [root@defiant windows]# ls
    testing.txt
    [root@defiant windows]#
    
  6. You have connected to the windows drive.

4. Connect to the shared drive with the konqueror or linux file browser:

  1. Open your file browser, in my case konqueror.
  2. In the file location bar, enter smb://192.168.13.107/public and press enter.
  3. You may be presented with a username and password login box. Enter the username and password of the windows box described at the top of this post.
  4. Congratulations you are connected to the shared folder.

TROUBLESHOOTING, if the above doesn't work.

Step 1: Have you tried restarting both computers

Reboot both of your computers. After that, make sure all your windows updates are done. Make sure Linux has its software updates taken care of as well. Reboot after updates.

Step 2: Review your Firewalls, ZoneAlarms, and other Security Software

A piece of software designed to protect your computer from viruses, malware or evils on the internet might be blocking your file sharing attempt. Windows firewall might be in a paranoid mode. Although it is unlikely Windows Firewall is to blame, turn it off temporally to verify it's not the problem. (don't leave it off).

Acquire a list of all the security software that might be set to paranoid mode. Windows Firewalls, 3rd party firewalls, ZoneAlarms, Antiviruses, Kaspersky, AVG, or anything else that claims to protect you from viruses/malware/evil. You will need to review these and either turn them off temporally, or open a white list through them for your IP address.

Step 3: Acquire clues from security software.

ZoneAlarm keeps a log of all folder share events and attempts, go to Overview->alerts and logs. And see a list of all your failed attempts. The same is possible for other software. In that case, it's protecting you from you.

Step 4: Suspect problems in the router or local area network itself

Maybe the router, wireless bridges, dumb hubs, or other network device has some directive shenanigan in it by blocking your shared folder connect attempt. The router or device itself might be blocking a port or has something in restrictive mode. Has anyone been fooling around with it lately? Try setting the router back to default everything and trying again.

Step 5: Make sure your local area network is simple and correct.

Are both your computers connecting to the same router? Perhaps one is connected to a crappy netgear wireless bridge and the other to a router? Simplify the network by having all computers connect to one router. Restart the routers and the internet, try again.

Step 6: Still not working. Isolate the defective unit.

It's time to herd cats and isolate the defective unit. Prove the windows box is not sharing your file by connecting to the share with a different computer. Get a friends windows laptop, or apple product and connect it to your network and see if they can access the share. If they can't, the windows box has a problem, if they can, the Linux box has the problem.

Step 7: Suspect the firewall on Linux

Take note of any special security alarm or special firewall software on Linux. Run system-config-firewall and make sure smb is checked. Check to make sure Linux is not preventing your mount. Create a smb share on another Linux box, and try to connect to that.

If none of this works. Use the nuclear option, re install both operating systems and start over at the top. This is rocket surgery.

  • 1
    That one did it for me. The issue in my case was caused by firewall settings that allowed ping but did not allow SMB connections on TCP port 445. – Paul Gear Jan 28 '14 at 6:06
  • Note that you may have to use sudo ping 192.168.13.107 not just ping 192.168.13.107 – Gabriel Staples Mar 6 '17 at 1:45
  • @GabrielStaples Why would you use sudo for this? – bryn Jun 15 '18 at 9:45
  • I have no idea, but I know I wouldn't have written that unless I first tried it without sudo, and it didn't work, and then tried it with sudo, and it did work. I'm sure I thought it odd then too that one worked and one didn't at the time. – Gabriel Staples Jun 15 '18 at 15:59
6

Try:

mount -t cifs -v //NAS_SERVER/public/ /mnt/ -o username=user,password=pass,sec=ntlm

The key is sec=ntlm

  • That didn't give me any joy – Paul Gear Jan 28 '14 at 5:40
  • 1
    What does sec=ntlm do? – Karl Richter Apr 23 '15 at 9:08
  • No idea what sec=ntlm does, but this is the only solution on this page that worked for me. Edit: here's an answer on ubuntu forums that explains why this works: ubuntuforums.org/… – Jonathan Landrum Jul 15 '16 at 18:23
4

Not sure just how relevant this is for your case, but I had a similar problem mounting a CIFS share on my Android phone:

# mount -t cifs //192.168.0.2/media/ /mnt/cifs/media -o username=user,password=pass
mount: mounting //192.168.0.2/media/ on /mnt/cifs/media failed: No such device or address
#

I tried removing the trailing slash and apparently it made a difference - it mounted:

# mount -t cifs //192.168.0.2/media /mnt/cifs/media -o username=user,password=pass
#
  • 1
    Yeah, shares aren't exactly directories, even if desktop environments like to pretend they are. – Eroen Sep 17 '12 at 14:19
4

Adding more possible solutions to this problem

This error message isn't very descriptive, but what it means is the operation has timed out. There are numerous possible reasons for this, and while researching this problem, I ran across some solutions that haven't been mentioned on this thread yet.

1.) Ambiguous Network

It isn't often mentioned in the various solutions you can find to this problem online, but the server you are connecting to has to be on the same subnet as your local machine. This problem arose for me because I had both the wired and wireless connections enabled, and determining which subnet the device belonged to was ambiguous, as the two connections aren't the same network. Disabling Wifi fixed the problem instantly. I stumbled upon this solution while reading Das Werkstatt:

[SOLUTION]

In my case, the DFS share was on a storage in a different subnet. I added a network alias (eth0:1) with an IP in that storage-subnet and then it worked.

I would have expected something like "no route to host" instead of the cryptic "error (115): Operation now in progress"...

Well, can't have it all ;)

Source: http://www.das-werkstatt.com/forum/werkstatt/viewtopic.php?f=7&t=2074

2.) Newlines at the end of the credentials file

Credentials files are useful if you have special characters such as the comma , in your password. It can be referenced in the options like so:

mount -t cifs //remote /mnt/local -o credentials=/path/to/cifs.credo

The file is formatted with sh-style variable declaration:

username=me
password=mypassword
domain=mydomain

If you are using a credentials file, make sure there are no newline characters at the end, or it will timeout while trying to parse the credentials file:

...
domain=mydomain
<empty line>

3.) Trying to mount a specific directory rather than the actual share point

If the specific directory you need is a subdirectory of the share, you won't be able to mount that folder directly. Attempting to do so results in a couple of different errors, this being one of them.

Instead, mount the share point itself, and then add a symbolic link to the subdirectory you need:

~> mkdir /mnt/local
~> sudo mount -t cifs //remote /mnt/local
~> ln -s /mnt/local/path/to/my-folder /mnt/my-folder

This way, you get the same result as mounting the subdirectory itself without having to drill down to it every time.

3

The problem in my situation was I had spaces in the credentials file /etc/smb-credentials

username = foobar
password = secret

After I changed it to:

username=foobar
password=secret

It worked.

2

I often have to quote the -o "username=joe,password=yadayada,domain=adomain" //share/share /mnt and it will mount right up and most examples I've looked up don't show that bit (if its needed on those systems).
I actually had that problem on my tablet just now (why I'm here wanted UNC name not IP) quotes fixed it right up.

1

Additional possible solution

If the share folder is from Windows 10 (probably applies to 7 and XP too), confirm that the Windows folder's share settings are configured properly for the type of network you are connected to, i.e. Public or Private.

I'll just relay my experience and adapt to your situation as appropriate. Open the list of wifi networks and for the one you're connected to, click Properties. Set to Public or Private as appropriate. (In my case, a Private network was incorrectly labeled Public.)

Once the network is classified correctly, right click your shared folder, select Properties, select the Sharing tab, select Network and Sharing Center link, and make sure Turn on file and printer sharing is selected for Public or Private depending on your wifi connection type as classified previously.

After doing this, I was able to connect a Debian machine to Windows 10 as expected.

0

Another problem can be with DNS. I was getting the same "operation now in progress" error. Browsing with Dolphin worked fine, though. The hostname I was using successfully with Dolphin resolves to 4 IP addresses, one of which ends in 0 (it's a subdomain name). When I use the name for one of the other 3 IP addresses, mount works. I guess Dolphin is smarter about looking up an actual host when given a (sub)domain name than mount is.

  • I don't know why my answer was down-voted. I included it because I was getting the same behavior as the OP but with a different root cause. I know the OP's issue has been addressed, but I think it may be helpful for others who come across this behavior to know that there's another possible cause. – Chris May 21 '18 at 20:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.