LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-02-2024, 08:27 AM   #16
estatistics
LQ Newbie
 
Registered: Sep 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by estatistics View Post
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?
 
Old 01-02-2024, 08:32 AM   #17
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,718

Rep: Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910
Quote:
can you send some relevant screenshot?
No, because it depends on the router's firmware.

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.
 
Old 01-02-2024, 09:00 AM   #18
estatistics
LQ Newbie
 
Registered: Sep 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
see here my ipv4,dhcp properties
https://ibb.co/X77mWP3
 
Old 01-02-2024, 09:06 AM   #19
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,718

Rep: Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910
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?
 
Old 01-02-2024, 09:27 AM   #20
estatistics
LQ Newbie
 
Registered: Sep 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
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"
 
Old 01-02-2024, 09:50 AM   #21
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
It will depend on the specific type of router you have.
 
Old 01-02-2024, 09:53 AM   #22
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,718

Rep: Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910
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.
 
1 members found this post helpful.
Old 01-02-2024, 10:41 AM   #23
estatistics
LQ Newbie
 
Registered: Sep 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Thanks you were very helpful!


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:

interface "enp3s0"
{
supersede host-name "NAME";
}

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.
 
Old 01-02-2024, 10:41 AM   #24
estatistics
LQ Newbie
 
Registered: Sep 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
link for the provided information: https://docs.nvidia.com/networking-e...stname-Option/
 
Old 01-02-2024, 01:06 PM   #25
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,718

Rep: Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910
It appears more of an issue with your router's firmware or how it is configured versus linux.
 
Old 01-03-2024, 09:25 AM   #26
estatistics
LQ Newbie
 
Registered: Sep 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
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.

So, i will file a bug.
 
Old 01-03-2024, 10:08 AM   #27
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,718

Rep: Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910
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.
 
Old 01-03-2024, 01:37 PM   #28
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,640

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
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.
 
Old 01-03-2024, 02:51 PM   #29
estatistics
LQ Newbie
 
Registered: Sep 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-03-2024, 05:21 PM   #30
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,718

Rep: Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910Reputation: 5910
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.
Attached Thumbnails
Click image for larger version

Name:	screenshot-1.png
Views:	6
Size:	113.5 KB
ID:	42338   Click image for larger version

Name:	screenshot-2.png
Views:	5
Size:	67.5 KB
ID:	42339   Click image for larger version

Name:	screenshot-3.png
Views:	5
Size:	80.9 KB
ID:	42340   Click image for larger version

Name:	screenshot-4.png
Views:	5
Size:	120.8 KB
ID:	42341  

Last edited by michaelk; 01-03-2024 at 05:35 PM.
 
  


Reply

Tags
bug, debian, hostname, xauthority



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HOSTNAME = hostname -> HOSTNAME: command not found ? thomas2004ch Linux - Software 2 08-26-2013 08:25 PM
set linux hostname & question about set multiple domain on one ip l0pht Linux - Networking 4 06-08-2012 10:14 AM
hostname vs. HOSTNAME ? sirius56 Linux - Newbie 2 02-16-2007 08:16 AM
Easy Question - set hostname in RH 9 kkempter Linux - Software 2 05-23-2003 03:49 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration