From Fedora Project Wiki
Description
Join the current machine to an Active Directory domain using kerberos credentials already acquired before the join.
Setup
- Fulfill the prerequisites and make sure your Active Directory domain access works. realmd 0.14.0 or later is required.
- You need a domain account as an administrator.
- Leave realm(s) you are currently joined to.
$ realm leave
- If you are joined to multiple domains, run this command multiple times.
How to test
- Run
kinit
to acquire kerberos credentials:$ kinit Administrator@AD.EXAMPLE.COM
- Make sure the realm name is upper case and the user's case is correct.
- Perform the join command.
$ realm join ad.example.com
- You should not be prompted for a password for the account again
- You will be prompted for Policy Kit authorization.
- On a successful join there will be no output.
- This can take up to a few minutes depending on how far away your Active Directory domain is.
Expected Results
- Check that the domain is now configured.
$ realm list
- Make sure the domain is listed.
- Make sure you have a
configured: kerberos-member
line in the output. - Make note of the
login-formats
line for the next command.
- Check that you can resolve domain accounts on the local computer.
$ getent passwd 'AD\User'
- Make sure to use the quotes around the user name.
- You should see an output line that looks like passwd(5) output. It should contain an appropriate home directory, and a shell.
- Use the
login-formats
you saw above, to build a remote user name. It will be in the form ofDOMAIN\User
, where DOMAIN is the first part of your full Active Directory domain name.
- Check that you have an appropriate entry in your hosts keytab.
sudo klist -k
- You should see several lines, with your host name. For example
2 HOSTNAME$@AD.EXAMPLE.COM
- Check that you can use your keytab with kerberos
sudo kinit -k 'HOSTNAME$@AD.EXAMPLE.COM'
- Make sure to use quotes around the argument, because of the characters in there. Make sure the hostname and domain are capitalized.
- Use the principal from the output of the
klist
command above. Use the one that's capitalized and looks likeHOSTNAME$@DOMAIN
. - There should be no output from this command.
More: Check the computer account
- If you have console access to a domain controller, you can use the Active Directory Users and Computers tool to see if that the computer account was created under the Computers section.
Troubleshooting
Use the --verbose
argument to see details of what's being done during a join. Include verbose output in any bug reports.
$ realm join --verbose ad.example.com