I wonder why my Ubuntu Server 14.04 LTS has problems resolving a hostname from fstab. I tried to mount the following entry:
//NAS-5h2-20/backuppc/ /mnt/backuppc cifs auto,user=THEUSER,password=THEPASSWORD,cifsacl,uid=109 0 0
the mount fails with the error
mount: wrong fs type, bad option, bad superblock on //NAS-5h1-15/backuppc,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
and the Syslog entry:
Unable to determine destination address.
HOWEVER, this works like a charm if I exchange the hostname NAS-5h2-20 for its IP 192.168.1.29. However, for portability reasons, I'd like to map the mount by hostname within the fstab.
Contents of /etc/hosts is (among other lines):
192.168.1.28 NAS-5h1-15
192.168.1.29 NAS-5h2-20
192.168.1.30 NAS-6h1-04
These Hostnames are not registered with the local DNS-Server. And it's intended do be in some cases able to use different IPs (servercluster/workstation) for DNS and server-internal usage, so I can't register them to the DNS.
It's also no Problem to
ping NAS-5h2-20
.
Thus I'm sure, it's a resolver problem. However, I can't figure out, where. I look at nsswitch.conf, nothing special there:
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
And /etc/resolv.conf also looks OK:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1
search ourdomain.local
So, questions:
- why does the resolver fail to read OR ignores the hosts file in this special case?
- is DNS/WINS/ some other resolving method hardcoded into mount.cifs?