[Bug 1996639] [NEW] Ubuntu Server installer mistreats hostname special characters
Dominik SzymaĆski
1996639 at bugs.launchpad.net
Tue Nov 15 18:54:00 UTC 2022
Public bug reported:
TL;DR;: Installer trimmed bad characters from hostname, but put my input
literally into /etc/hosts
I was installing Ubuntu Server in vmware from freshly downloaded ISO from your webpage.
`lsb_release -rd` output after finish:
Description: Ubuntu 22.04.1 LTS
Release: 22.04
CRC32 of image: 3d73cc1f
It asked me to update installer so I did (not sure which exactly version
it was).
After some steps of me not choosing any extra packages, formatting whole
drive, selecting network showed up form to put in my name, hostname,
username and password.
Into the hostname field I've put:
mac_ubuntu
Nothing complained so I went with it no problem (although I think
"Installing kernel" step took weirdly lot of time, but that might be
unconnected).
After install I logged in into SSH and noticed prompt being:
dominik at macubuntu:~$
So I though: no biggie, it trimmed the chars it didn't like, and that's
probbaly what happened.
However I noticed `sudo` taking long time. Little search pointed me to
the answer, that `/etc/hosts` file might be missing 127.0.0.1 entry for
my hostname, and so it ended up being!
Result of `hostname`:
macubuntu
Contents of `/etc/hosts`:
127.0.0.1 localhost
127.0.1.1 mac_ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
And as you can see, entry for 127.0.1.1 is what I've originally put into the installer form, not what machine thinks hostname is.
After adding entry:
127.0.0.1 macubuntu
Sudo started behaving.
It's most probably low priority issue, affecting slim percentage of
people, but sanitizing input or even validating that user puts only
allowed chars in there could be a great idea.
** Affects: debian-installer (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debian-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1996639
Title:
Ubuntu Server installer mistreats hostname special characters
Status in debian-installer package in Ubuntu:
New
Bug description:
TL;DR;: Installer trimmed bad characters from hostname, but put my
input literally into /etc/hosts
I was installing Ubuntu Server in vmware from freshly downloaded ISO from your webpage.
`lsb_release -rd` output after finish:
Description: Ubuntu 22.04.1 LTS
Release: 22.04
CRC32 of image: 3d73cc1f
It asked me to update installer so I did (not sure which exactly
version it was).
After some steps of me not choosing any extra packages, formatting
whole drive, selecting network showed up form to put in my name,
hostname, username and password.
Into the hostname field I've put:
mac_ubuntu
Nothing complained so I went with it no problem (although I think
"Installing kernel" step took weirdly lot of time, but that might be
unconnected).
After install I logged in into SSH and noticed prompt being:
dominik at macubuntu:~$
So I though: no biggie, it trimmed the chars it didn't like, and
that's probbaly what happened.
However I noticed `sudo` taking long time. Little search pointed me to
the answer, that `/etc/hosts` file might be missing 127.0.0.1 entry
for my hostname, and so it ended up being!
Result of `hostname`:
macubuntu
Contents of `/etc/hosts`:
127.0.0.1 localhost
127.0.1.1 mac_ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
And as you can see, entry for 127.0.1.1 is what I've originally put into the installer form, not what machine thinks hostname is.
After adding entry:
127.0.0.1 macubuntu
Sudo started behaving.
It's most probably low priority issue, affecting slim percentage of
people, but sanitizing input or even validating that user puts only
allowed chars in there could be a great idea.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1996639/+subscriptions
More information about the foundations-bugs
mailing list