After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700846 - Add a way to set the FQDN hostname
Add a way to set the FQDN hostname
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: general
3.8.x
Other Linux
: Normal enhancement
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-22 16:04 UTC by Adam Williamson
Modified: 2021-06-09 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple patch to allow periods in hostnames (675 bytes, patch)
2013-05-22 16:46 UTC, Adam Williamson
rejected Details | Review

Description Adam Williamson 2013-05-22 16:04:11 UTC
Both the Sharing and Details panels in control-center allow you to set the system's hostname. However, neither appears to be capable of setting the domain, and I can't find anywhere else in control-center to do it (doesn't seem to be available in Network, which is the only other obvious place).

If a machine has a dotted "static hostname" - foo.localdomain, say - and no "pretty hostname", the Sharing and Details panels will *show* that dotted hostname. But entering anything of the form foo.bar in the "Computer name" (Sharing) or "Device name" (Details) text boxes results in the "static hostname" being set to foo-bar and the "pretty hostname" to foo.bar.

It seems like there ought to be _some_ way to set the domain. Note that Fedora's 'anaconda' installer does not show the Network pane, where you can configure the hostname and domain, in live installs; the idea is that you can use the host desktop environment to configure the network and hostname. So right now, you cannot set a domain name when doing a live install of Fedora from GNOME, aside from doing it via hostnamectl at the console.
Comment 1 Adam Williamson 2013-05-22 16:46:01 UTC
I have a fairly simple patch for this that I'll attach, but it requires adjustments to the hostnames-test.txt test. And possibly it needs to be a slightly more sophisticated patch (which I'm not capable of writing, I only do monkey hacks) if you're *really* worried about someone typing "Bãstien's computer... Foo-bar" into the box.
Comment 2 Adam Williamson 2013-05-22 16:46:31 UTC
Created attachment 245066 [details] [review]
simple patch to allow periods in hostnames
Comment 3 Bastien Nocera 2013-06-04 17:22:05 UTC
Review of attachment 245066 [details] [review]:

No, the hostnames set are the short hostname, not the full one.
Comment 4 Adam Williamson 2013-06-04 17:24:52 UTC
What do you mean by 'short hostname'? hostnamectl refers to 'static hostname' and 'pretty hostname'. For all practical purposes, 'static hostname' appears to be the 'real' one.

'man hostnamectl' says:

       Note that the pretty hostname has little restrictions on the characters
       used, while the static and transient hostnames are limited to the
       usually accepted characters of internet domain names.

'limited to the usually accepted characters of internet domain names ' - well, . is pretty clearly one of those.
Comment 5 Adam Williamson 2013-09-25 22:49:47 UTC
I've been playing with this some more lately, and found that the whole area of hostnames is psychopathically complicated, but I'll remark that at least some software does expect the 'short' hostname - by which I think you mean "what is returned by 'hostname' rather than what is returned by 'hostname -f'" - to be an FQDN. Specifically, FreeIPA: it is not happy with this:

[root@adam live]# hostname
adam
[root@adam live]# hostname -f
adam.happyassassin.net

But requires this:

[root@adam live]# hostname
adam.happyassassin.net
[root@adam live]# hostname -f
adam.happyassassin.net
Comment 6 Adam Williamson 2014-09-07 00:16:24 UTC
I further note that this bug makes it impossible to join a FreeIPA domain with GNOME without console interaction.

To reproduce: go to System and try to set a correct hostname for the FreeIPA domain - for instance, test.happyassassin.net. You can verify with 'hostname' that this comes out as 'test-happyassassin-net'.

Now go to Users, click +, click Enterprise Login, enter the correct domain (in my case, happyassassin.net), enter a Username and Password, provide the IPA admin credentials when prompted, and click Enroll,

For me this gives:

Failed to join domain
Running ipa-client-install failed

If I then go check /var/log/ipaclient-install.log, I see:

2014-09-07T00:13:13Z ERROR Joining realm failed: The hostname must be fully-qualified: test-happyassassin-net

2014-09-07T00:13:13Z ERROR Installation failed. Rolling back changes.
2014-09-07T00:13:13Z ERROR IPA client is not configured on this system.
Comment 7 Adam Williamson 2014-09-07 00:51:41 UTC
"I further note that this bug makes it impossible to join a FreeIPA domain with
GNOME without console interaction." <--- well, it's impossible if the hostname hasn't previously been set correctly during installation or something.
Comment 8 Bastien Nocera 2014-09-08 15:43:37 UTC
I would argue that the hostname should have been set ahead of time during the kickstart/deployment phase for managed systems, or given out by the DHCP server for unmanaged deployments.

The "Computer Name" and "Device name" sections, in the Sharing and Details panels respectively, are about providing a user-visible name for the device and its services. For example: "Adam's shared files on test" for file sharing, or the visible name of the Bluetooth device.
Comment 9 André Klapper 2021-06-09 16:00:15 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/

Thank you for your understanding and your help.