You are not logged in.

#1 2022-12-01 16:02:05

Colonel Panic
Member
Registered: 2018-11-13
Posts: 1,403

Sudo: unable to resolve host explained

This was a problem which cropped up after I updated Devuan, and the tutorial below shows how it can be resolved (and was in my case);

https://www.globo.tech/learning-center/ … explained/

Last edited by Colonel Panic (2022-12-01 16:02:22)

Offline

#2 2022-12-02 12:45:52

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Sudo: unable to resolve host explained

Interesting:

su - root

doesn't work for me but

sudo su

does.

 02 Dec 22 @ 09:37:47 ~
   $ sudo su
[sudo] password for sector11: 
root@Debian:/home/sector11# cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	Debian
0.0.0.0 www.facebook.com

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#3 2022-12-02 16:25:14

el_koraco
Member
Registered: 2016-02-08
Posts: 307

Re: Sudo: unable to resolve host explained

Sector11 wrote:

Interesting:

su - root

doesn't work for me but

sudo su

does.

 02 Dec 22 @ 09:37:47 ~
   $ sudo su
[sudo] password for sector11: 
root@Debian:/home/sector11# cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	Debian
0.0.0.0 www.facebook.com

Do you have the root account enabled?

Offline

#4 2022-12-02 17:16:55

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Sudo: unable to resolve host explained

el_koraco wrote:

Do you have the root account enabled?

Default when sudo is installed is to not allow root to login.
Root acount is enabled but root is not allowed to login as no password is set.
Setting password allows root to login, but nothing else is changed on root acount.


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#5 2022-12-02 21:46:27

el_koraco
Member
Registered: 2016-02-08
Posts: 307

Re: Sudo: unable to resolve host explained

Is it like that in Devuan too? I know they use the refracta installer, it might have different options.

Offline

#6 2022-12-02 23:34:19

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Sudo: unable to resolve host explained

el_koraco wrote:

Is it like that in Devuan too? I know they use the refracta installer, it might have different options.

It is some years ago I made an install with refracta. I don't remember. But probably it was not devuan. It was some derivate Arne Exton made...

But, as I have understood, the only difference with Devuan is that they opted out on systemd.


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#7 2022-12-03 09:47:19

el_koraco
Member
Registered: 2016-02-08
Posts: 307

Re: Sudo: unable to resolve host explained

I checked it out, it seems the live CD uses a weird installer, the normal iso uses the debian installer.

Offline

#8 2022-12-03 11:49:02

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Sudo: unable to resolve host explained

el_koraco wrote:

I checked it out, it seems the live CD uses a weird installer, the normal iso uses the debian installer.

It is refractainstaller:

"Refracta Installer will install the operating system to hard drive from
a running live-CD or live-USB session. The running system will be copied
exactly - any changes you make to the running system, including desktop
preferences, configuration changes, or added software will be copied to
the installed system."
https://refracta.org/docs/readme.refractainstaller.txt

Anything you are not used to is easy to perceive as weird...


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#9 2022-12-03 12:48:58

el_koraco
Member
Registered: 2016-02-08
Posts: 307

Re: Sudo: unable to resolve host explained

ok, so the question for Sector still stands, does he have the root account enabled. If he doesn't, then the answer to his su - question is clear.

Offline

#10 2022-12-03 12:49:21

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Sudo: unable to resolve host explained

rbh wrote:
el_koraco wrote:

Do you have the root account enabled?

Default when sudo is installed is to not allow root to login.
Root acount is enabled but root is not allowed to login as no password is set.
Setting password allows root to login, but nothing else is changed on root acount.

Exactly.

And to add, I think this is the first time I have seen:

sudo root

In 15 years of using Linux I don't think I have ever had a "root password".  Maybe with Ubu at the very beginning, can't remember.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#11 2022-12-03 14:59:48

el_koraco
Member
Registered: 2016-02-08
Posts: 307

Re: Sudo: unable to resolve host explained

I don't run my user with sudo.

Offline

#12 2022-12-03 16:01:27

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Sudo: unable to resolve host explained

Sector11 wrote:

In 15 years of using Linux I don't think I have ever had a "root password".  Maybe with Ubu at the very beginning, can't remember.

I bought a new server and installed it 2016.10.11. Installed with sudo. After just some months, I set password for root. It makes administration easier...


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#13 2022-12-04 02:28:51

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Sudo: unable to resolve host explained

Well, I have 1 computer, no local network and have never (to the best of my knowledge) had a root password.

I'm fine with that.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB