CIFS share mount errors
Solution 1
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.
- Open the file browser to
C:\
. - Create a new folder called
public
. So you now have C:\public - Inside that folder, make a new text document called "testing.txt".
- Right click the folder
C:\public
and go to properties. - Click the sharing tab.
- Make sure: "Share this folder on the network" is checked. Note the share name: 'public'.
- 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':
- Open a console and
su
to root. make a directory
mkdir /mnt/windows
This will be where you access the shared files.-
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]#
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.
-
run the command
cd /mnt/windows
and runls
. The contents of the drive are presented:[root@defiant windows]# ls testing.txt [root@defiant windows]#
You have connected to the windows drive.
4. Connect to the shared drive with the konqueror or linux file browser:
- Open your file browser, in my case konqueror.
- In the file location bar, enter
smb://192.168.13.107/public
and press enter. - 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.
- 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.
Solution 2
Try:
mount -t cifs -v //NAS_SERVER/public/ /mnt/ -o username=user,password=pass,sec=ntlm
The key is sec=ntlm
Solution 3
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.
Solution 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
#
Solution 5
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.
Kendall
Updated on September 18, 2022Comments
-
Kendall almost 2 years
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?
-
Eroen almost 12 yearsYeah, shares aren't exactly directories, even if desktop environments like to pretend they are.
-
Paul Gear over 10 yearsThat didn't give me any joy
-
Paul Gear over 10 yearsThat 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.
-
Kalle Richter about 9 yearsWhat does
sec=ntlm
do? -
Jonathan E. Landrum almost 8 yearsNo 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/… -
Gabriel Staples over 7 yearsNote that you may have to use
sudo ping 192.168.13.107
not justping 192.168.13.107
-
Chris about 6 yearsI 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.
-
bryn about 6 years@GabrielStaples Why would you use sudo for this?
-
Gabriel Staples about 6 yearsI 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.