DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
what means an address reservation in the router for this PC? How i can check that? i go to 192.168.2.1 and i enter router. then? can you send some relevant screenshot?
Yes i find that router give a name "easy.box". What i can do about that?
I connect two computers in same router with different "users" lets say hostname for one is "nick" and the other is "peter".
Why hostname command cannot change it for each computer? I must have "easy" as hostname on all computers?
Do you have a manual for the router? Basically an address reservation is setting a static IP address by the router's dhcp server. The DHCP server can assign various parameters like gateway address, DNS servers, time server and even host name.
Name for central computer? So it looks like some setting which is you blacked out that defaults to easy.box? Some sort of default local domain name?
yes, it was default by router.
However, i saw that i can set two static ips. Router recognize both computers with the names that i have given them (hostname).
However, changes in the file "/var/lib/dhcp/dhclient.enp3s0.leases" it seams that remain after reboot in contrast to hostname and sysctl.
So, dhcp takes the name from router. then hostname cant change it. Sysctl can change it but only temporarily.
So, i dont know yet. if this can be a problem from linux, from router (me), or both.
Note that changing hostname other than the given by you, it can fail to register terminals, displays, and other things "magic number problems" as while .xauthority file and of course, sudo is failing.
So, either:
i must set kernel.hostname somewhere in boot time, AFTER dhcp has done its setup, in order not to change it.
or i must somehow configure both computers with static ip, and i hope to not change the hostname of them.
However, i cannot see any option for two "central" computers as it has only one "central name".
at the moment, I am satisfied that it is keeping the given hostname the file "/var/lib/dhcp/dhclient.enp3s0.leases"
When the lease renews the host name is most likely sent again by the router but I have not paid attention to know for my systems. You might want to check the dhclient.conf file. Typically the client sends the hostname to the server and if not correct might be causing your problems.
Hostname Configured in hostname File Is Superseded by the DHCP hostname Option.If a Cumulus Linux switch receives a DHCP lease containing the hostname option, the received DHCP hostname supersedes any hostname applied in /etc/hostname.
Issue
Changing the system hostname via /etc/hostname in Cumulus Linux does not have any effect while an active DHCP lease containing the hostname option exists, or if an active DHCP server continues to offer the hostname option in assigned leases.
Environment
Active DHCP lease containing the hostname option cached in /var/lib/dhcp/dhclient.eth0.leases, and/or a DHCP server offering a lease containing the hostname option
DHCP client configuration in /etc/dhcp/dhclient.conf containing default parameters send host-name and request host-name
Cause
This condition can occur when a switch running Cumulus Linux obtains a DHCP lease on management port eth0 and you attempt to change the hostname by editing /etc/hostname.
If you try to reboot the switch to change to the new hostname configured in /etc/hostname while the previous DHCP lease is still active, the DHCP hostname option cached locally on the switch in /var/lib/dhcp/dhclient.eth0.leases and/or the hostname option received from an active DHCP server supersedes the name manually configured in /etc/hostname.
Note that even if the DHCP server is not explicitly configured to offer a lease containing the hostname option, it might continue to send a previous version of the switch hostname configured in /etc/hostname because Cumulus Linux enables the send-hostname option by default in /etc/dhcp/dhclient.conf. This causes the switch to send the locally configured hostname in DHCP Discover and Request messages. The DHCP server might cache this value and continue to offer it back in subsequent DHCP offers to the switch as long as the original lease is active, which supersedes any new changes made to /etc/hostname on the switch.
Resolution
You have two ways to work around this issue. You can configure dhclient.conf to:
Supersede the hostname option received from DHCP
Not request the hostname option in DHCP Discover and Request packets
Superseding the hostname Option
After configuring the desired hostname in /etc/hostname, add the following line to /etc/dhcp/dhclient.conf to supersede any received hostname option from DHCP with the desired hostname configured in /etc/hostname instead:
supersede host-name "configured-hostname";
Not Requesting the hostname Option
If preferred, you can configure /etc/dhcp/dhclient.conf to not request the hostname option in the Parameter Request List [option 55] in DHCP Discover and Request packets.
to do this, edit /etc/dhcp/dhclient.conf and remove "host-name" from the Request option list.
================================
in my case i may remove
send host-name = gethostname();
However, also, i can set hostname explicity in dhclient.conf as:
However, I find it somewhere confusing. Linux must warn you that the "default" hostname has changed, and what steps you may take further. Of course you must have the ability to deactivate such messages.
Hostname is central in using linux effectively. So, i think such messages must implemented as well some cues where to look for that problem. At this moment, nothing like this exists.
So, a clean debian distribution, has as default to get the host name from router. "send host-name = gethostname();" in "/etc/dhcp/dhclient.conf".
Hostname and other linux command cannot overwrite it at boot time.
Imagine, a family with 3-4 linux computers, that they have give different names in their computers, router/linux change name to a default one. This can result even a halt on the system.
So yeah, it is 100% a bug, erroneous behaviour of linux. It must at least print a message somewhere that "hostname from router is that" that differ from the host name that you have set in hostname file. Please check these config files etc.
I disagree. I have installed debian and many other distributions as VMs and have not experienced this behavior. Many distributions like debian will provide a default host name when installing but that is easily modified to something else. I have 5 physical computers that run some version of linux a including Raspberry Pi, an Odroid running Home Assistant, a sprinkler system, various virtual machines. In addition I have Windows laptops, network printers and a wireless access point. My router runs PFsense and it has not changed the host name of any device unless I have set it with a DHCP static reservation.
With some router's that have local DNS capability including PFsense, it can set the domain name which I think that is what is happening in your case but since you blacked out everything I can not tell. Either there is a setting not configured correctly or something wrong with the firmware or just that DHCP is broken on the device and is sending the domain name as host name. I would check the manufacture's website to see if there is a firmware upgrade and look at the release notes to see if any upgrades are related to DHCP.
As an aside Red Hat's default host name was localhost which has caused a few headaches for some.
I agree: not a bug. This is not an example of misbehavior of Debian, but rather an example of mismanagement of your network. I seem to recall a way to limit what information form DHCP would be accepted, but lacking that changing the settings on your DHCP server to not manage the client's hostname seems the solution.
a) What i made blacked was written in Greek, i written then in english. No other information existed.
Can someone try a clean install of "debian lxqt favour" latest distribution? Maybe it is specific on some debian distribution and report back? Test to see what is the hostname in hostname, and see what name it exists in dhclient lease file as well do an hex on xauthority.
Please provide names(users) for sudoers when installing.
By default lxqt uses ConnMan as the connection manager, not dhclient and what it uses as the lease file does not contain host name. For what is worth I included the screenshots as desired.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.