You are not logged in.

#1 2013-02-11 19:39:33

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 123
Website

[SOLVED] How do you set your hostname + domain with systemd?

I've just switched my machine to systemd, but I'm unable to mount my NFS shared due to permission errors.  I believe the problem is that my machine no longer has a domain name, and the NFS server is granting access based on the machine's domain:

$ cat /etc/hostname
korath

$ hostname
korath

$ hostname -s
localhost

$ hostname -f
localhost.localdomain

How can I change "localdomain" to my actual real domain?  The wiki page on systemd says you can't use dots in a hostname, and this is indeed the case:

$ hostnamectl set-hostname korath.my.domain.com
$ cat /etc/hostname
korathmydomaincom

Any suggestions?

Last edited by Malvineous (2013-02-12 19:34:33)

Offline

#2 2013-02-11 21:00:51

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: [SOLVED] How do you set your hostname + domain with systemd?

Instead of using the hostnamectl utility, try just editing /etc/hostname manually.

Offline

#3 2013-02-12 19:34:19

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 123
Website

Re: [SOLVED] How do you set your hostname + domain with systemd?

Thanks, that did it.  I also posted on the systemd-devel list and they said the latest version of systemd has fixed this.

Also I had to remove my hostname from /etc/hosts to avoid it telling me "localhost.localdomain" was the FQDN of my machine.

Offline

Board footer

Powered by FluxBB