LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   why debian set hostname to easy? (https://www.linuxquestions.org/questions/debian-26/why-debian-set-hostname-to-easy-4175732313/)

estatistics 12-31-2023 09:17 AM

why debian set hostname to easy?
 
why debian set hostname to easy?

This creates a lot of problems.

Installed the latest debian lxqt bookworm 12 distribution.
Same problem again.

I must set kernel.hostname in sysctl.conf, then in bashrc to write
sudo sysctl --system -p.

However, even sometimes, the hostname goes back to "easy" for unknown reasons.
Sadly, it is populated in a lot of files. Especially in .Xauthority that creates the following problems:
"invalid magic number", "problems to open display :0".

So, I tried to report the bug in debian bug tracker using sysctl package.
But it is said unknown package.
How i can properly report this problem to debian devs?
What package i must use?





Sincerely,
Elias

ps. 5 years vegan

mrmazda 12-31-2023 09:50 AM

What does "to easy" mean? Is "easy" the content of /etc/hostname? Do you rather mean /etc/hostname is excessively easy to change?

Have you ever tried setting hostname with hostnamectl?

IsaacKuo 12-31-2023 09:53 AM

What are the contents of /etc/hostname?

Try altering the contents of /etc/hostname to be a single line with your desired new hostname. Then reboot.

michaelk 12-31-2023 10:30 AM

I typically use the net install option and the default hostname is "debian" and I would expect the live versions to be the same.

estatistics 12-31-2023 10:32 AM

Quote:

Originally Posted by IsaacKuo (Post 6473796)
What are the contents of /etc/hostname?

Try altering the contents of /etc/hostname to be a single line with your desired new hostname. Then reboot.

Quoting myself: "why debian set hostname to easy?". `kernel.hostname=easy`.
Hostname has my NAME, not "easy" name. Nothing to do there.
I have found as i described a temporary solution.

It is a bug of debian. How i can report it this to debian bug report system?
What package to put as bug? sysctl? hostname or other?

mrmazda 12-31-2023 10:51 AM

Code:

HOSTNAMECTL(1)                                    hostnamectl                                    HOSTNAMECTL(1)

NAME
      hostnamectl - Control the system hostname

SYNOPSIS
      hostnamectl [OPTIONS...] {COMMAND}

DESCRIPTION
      hostnamectl may be used to query and change the system hostname and related settings.

You may expect your bug report to be designated invalid.

michaelk 12-31-2023 11:04 AM

I have several debian virtual and physical machines of different versions and none of them have exhibited a similar problem. For me:

/proc/sys/kernel/hostname = /etc/hostname

Are you actually writing to /etc/sysctl.conf? The file is only writable by root.

estatistics 12-31-2023 11:59 AM

Of course i am writing to sysctl.conf as root user.

2 different machines (no virtual ones), same problem! This is not random error.
(latest stable debian distribution).

michaelk 12-31-2023 12:16 PM

I have 4 machines both physical and virtual running latest stable and none of them have your problem. Are they standalone and not part of a domain etc?

estatistics 12-31-2023 12:38 PM

standalone on same router
 
standalone on same router

michaelk 12-31-2023 02:06 PM

Are you using a reservation from the router to assign an address to the computers?

wpeckham 12-31-2023 02:13 PM

FYI: none of my Debian machines exhibit this problem. I doubt it is the Debian install that is caused the symptoms, and if that is correct it is not something the Debian team can address in the software.

estatistics 01-02-2024 06:59 AM

I find the cause of my problems.

please check your file, and tell me what do you see in your machines.
in file: /var/lib/dhcp/dhclient.enp3s0.leases

in the line `option host-name "easy.box";` before .box what it writes? your hostname or another?

It seems, that in latest debian distribution, somehow this line it cannot modified with any proper command like eg. hostname, or even sysctl exept aftermath but in every boot, its there.

The file "dhclient.enp3s0.leases" is created from what application/package?

michaelk 01-02-2024 07:40 AM

The leases file is basically a log of valid dhcp leases from the DHCP server created by dhclient. Of the two debian 12 systems I just checked Network Manager is the DHCP client not dhclient.

The option host-name in the leases file indicates the router is sending the hostname to the client. This is why I asked if you have a address reservation in the router for this PC.

estatistics 01-02-2024 08:21 AM

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?


All times are GMT -5. The time now is 11:23 AM.