Unexpectedly, the command failed with the following message:
net -U administrator ads join
I was puzzled, since DNS domain name was correct, and I was using Domain Admin credentials.
Failed to set servicePrincipalNames. Please ensure that the DNS domain of this server matches the AD domain, Or rejoin with using Domain Admin credentials. Disabled account for 'SERVERNAME' in realm 'DOMAIN'
After some searching, I came upon an advice here to check /etc/hosts. And indeed, the file contained an entry created by my distribution (Fedora) setup process which looked like:
Where SERVERNAME was a short name (without domain). Changing it to
or just removing it resolved the issue. Rather weird.