user.and root différente hostname, is it normal?

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
gapan
Salix Wizard
Posts: 6236
Joined: 6. Jun 2009, 17:40

Re: user.and root différente hostname, is it normal?

Post by gapan »

SalixManiac wrote: 29. Jun 2022, 17:49 but always,

$sudo dmesg
(root@darkstar)
That is reported right when it boots, before anything gets read from the drive, so it uses the hostname baked into the kernel.
SalixManiac wrote: 29. Jun 2022, 17:49 $sudo find /etc/ssh/ -type f -exec grep -H 'darkstar' {} \;
/etc/ssh/ssh_host_ed25519_key.pub:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO+CvUDEpzBjqOrAzOywjEbRuTgNbQwfhWENSpwuWkLd root@darkstar
This was created before you changed the hostname. You may recreate your ssh keys if you want that changed, or you can just edit it with a text editor to your desired hostname or anything else really, it doesn't really matter.
Image
Image
User avatar
SalixManiac
Posts: 113
Joined: 15. Apr 2022, 02:26

Re: user.and root différente hostname, is it normal?

Post by SalixManiac »

That is reported right when it boots, before anything gets read from the drive, so it uses the hostname baked into the kernel.
i have a kernel based on the slackware source kernel but without: CONFIG_DEFAULT_HOSTNAME="darkstar"
only
CONFIG_DEFAULT_HOSTNAME=""

two hostnames on one machine is dangerous?
Colin Chapman “light is right” those last words "the middle pedal is for cowards"
User avatar
gapan
Salix Wizard
Posts: 6236
Joined: 6. Jun 2009, 17:40

Re: user.and root différente hostname, is it normal?

Post by gapan »

But you don't have two hostnames!

I don't know about your custom kernel, you may not be using that, or you may not have configured it how you think you configured it, but your system reports the same hostname either with sudo or not.
Image
Image
User avatar
SalixManiac
Posts: 113
Joined: 15. Apr 2022, 02:26

Re: user.and root différente hostname, is it normal?

Post by SalixManiac »

Yep the same,

I think you put me on the right track, I will investigate the kernel, but all salix users who use the Kernel Slackware must have the same problem.

No need to touch the SSH key it is a symbolic link
7zigvkkrgrgrnwv8h8aicbv8fuwk79iq = root@localhost

I would keep you informing of my adventures :geek: .
Colin Chapman “light is right” those last words "the middle pedal is for cowards"
User avatar
SalixManiac
Posts: 113
Joined: 15. Apr 2022, 02:26

Re: user.and root différente hostname, is it normal?

Post by SalixManiac »

SOLVED

All I know is that I don't know anything.
It is certainly a Userless method

I recompile the kernel with:
CONFIG_DEFAULT_HOSTNAME="coquelicot"
Image

now the root hostname match with user hostname:
Image

I have changed darkstar by my hosname in:
/etc/ssh/ssh_host_ed25519_key.pub
Here it is not a symbolic link.

It may be a bad idea to change the user hostname without changing the Root Hostname.
I think it's not a bad idea to change Darkstar like Hostname for Root and User.

thank you for your help gapan
Colin Chapman “light is right” those last words "the middle pedal is for cowards"
Post Reply