My 2 PR4100 and 2 EX4 do this and it is bugging me.
I am also wondering if it’s the root cause of my AD issues with users mapping shares or is it just wrong.
In the “Settings” > “General” > “Device Profile” > “Device Name” is “WD-PR4100-02”
Logging in as sshd through PuTTY.
root@WD-PR4100-02 ~ # hostname
WD-PR4100-02
root@WD-PR4100-02 ~ # hostname -i
192.168.123.12
root@WD-PR4100-02 ~ # hostname -f
WD-PR4100-02 ← This should be the FQDN
Hi @delldsb
Have you opened a Support Case? If not opened, for more information, please contact the WD Technical Support team for the best assistance and troubleshooting:
Update:
Changing the entry for “hosts” in the /etc/nsswitch.conf file “solved” the issue.
The line looks like this as the default:
root@WD-PR4100-02 ~ # cat /etc/nsswitch.conf
…
…
hosts: files dns
…
…
Basically, with the “files” option being first on the list will cause many system commands to use the /etc/hosts file first to resolve the hostname.
The problem is that the FQDN is not in the PR4100’s hosts file and the ‘hostname -f’ will return the wrong data (the simple hostname).
I edited the /etc/nsswitch.conf file to swap the entries:
hosts: dns files
This “solved” the lookup for the ‘hostname -f’ command and returned the true FQDN.
If DNS is offline or unreachable, the commend will time-out and use the file (/etc/hosts).
I don’t know if this helped with any other issues, but at least it is correct now.
I know there are some files that are not persistent. They get replaced by the OS back to the “original” files that are stored someplace on the PR4100 (I think /etc/hosts was one). But I’ll keep an eye on the this to see if the /etc/nsswitch.conf is one that gets rewritten.