1

I found something weird in my debian 9 config.

I changed my hostname by editing /etc/hostname and rebooting from "myhost" to "myhost-hello".

Since this modification connecting to the machine via it's ip (I don't use WINS or other functions like that at all) shows the server not reacheable.

I said myself.. maybe it's some kind of firewall issue, so I directly connected to the machine but the machine was still not reacheable via smb:// from an ubuntu test pc.

I tried to reboot the samba daemon various times with any success..

When I switched the hostname of the target machine back to "myhost" samba returned available.

I wonder.. is there some kind of automatic configuration of the hostname that makes samba not reacheable if the hostname changes? (note again that I connect to that machine via it's ip, and I don't use the wins feature or try to connect to it via it's hostname)

  • You might need to change server string under /etc/samba/smb.conf too – Achu Jan 17 '18 at 11:55
  • @Achu I can't find that setting inside the config file.. :( should I declare it explicitly ? but in that case why changing hostname makes it not reacheable ? – user3450548 Jan 17 '18 at 12:01
  • @Achu I found it inside the smb.conf manual.. it says that it just changes the comment about the smb server.. it seems unrelated to my problem.. – user3450548 Jan 17 '18 at 12:58
0

Seems that the error got solved editing also the /etc/hosts making the machine able to understand that the hostname must be searched locally instead being passed via the default gateway.

So.. TL;DR:

/etc/hosts

edit the line

myhost 127.0.0.1 for example to

myhost-hello 127.0.0.1

... that's all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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