Red Hat Bugzilla – Bug 637383
mount.cifs ip option does not work
Last modified: 2014-06-18 03:40:37 EDT
Description of problem:
mount.cifs fails when using the ip= option with the message:
mount error: could not resolve address for iomega1: Name or service not known
When I add the ip address and servicename to /etc/hosts it works. I think it would be better if it could work without the /etc/hosts entry
The actual command:
mount.cifs //iomega1/public /mnt/iomega -o "user=leon,uid=leon,gid=leon,ip=192.168.0.123,nounix,file_mode=0640,dir_mode=0750"
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. No entry for ip address in /etc/hosts
2. Submit command shown above
3. Error message
Error message shown above
CIFS disc iomega1 mounted
Temp fix by adding service host to /etc/hosts. This should not be necessary.
The same command worked flawlessly in Fedora 11 on same machine.
What's the point of putting an ip= option here? Why not just put the address in as part of the UNC? i.e.:
Good point. It's just that it used to work in previous versions.
I just tried your solution; it works.
Created attachment 450314 [details]
patch -- reinstate ip= as an address resolution override option
Yep, it's still a regression though you don't really have to put stuff in /etc/hosts to work around it.
Does this (completely untested) patch fix it?
Reproduced and a fixed patch posted upstream:
...unless there are objections this should make the next cifs-utils release (4.7).
Patch pushed to cifs-utils git master branch. I'll plan to cut an upstream release in the next week or so.
cifs-utils-4.7-1.fc14 has been submitted as an update for Fedora 14.
cifs-utils-4.7-1.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update cifs-utils'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/cifs-utils-4.7-1.fc14
cifs-utils-4.7-1.fc13 has been submitted as an update for Fedora 13.
cifs-utils-4.7-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
cifs-utils-4.7-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.