QA:Testcase adcli join nodns

From FedoraProject

Revision as of 08:14, 10 April 2013 by Stefw (Talk | contribs)

Jump to: navigation, search

Contents

Description

This test case verifies that adcli join can work without DNS.

Setup

  1. Make sure to complete the prerequisites before starting this test.
  2. Test general adcli info functionality before doing this test.
  3. Your machine should have a valid unique host name. It shouldn't be localhost.
  4. You need a domain account that is capable of joining the domain, for example an administrative account.
  5. These commands are meant to be run as root.
  6. You need the IP address of a domain controller for your domain. Find it like so:
    $ adcli info domain.example.com | grep domain-controller
    $ nslookup <domain-controller-from-previous-command>

How to test

  1. Remove your host keytab
    # test -e /etc/krb5.keytab && mv /etc/krb5.keytab /etc/krb5.keytab.bak
  2. Move your resolv.conf file to completely break DNS resolution.
    # mv /etc/resolv.conf /etc/resolv.conf.bak
  3. Use adcli to join the domain, placing your domain controller IP address in the appropriate place:
    # adcli join --login-user=Administrator --domain-controller=10.10.10.10 domain.example.com

Expected Results

The join command should prompt for a password and then complete without error.

The join command will take a few seconds. It can take up to a minute in extreme cases where the domain controller for the domain is far away (latency wise).

The host keytab should contain new credentials for the host, like this. The KVNO, computer name, and domain name will differ.

# klist -k
Keytab name: FILE:/etc/krb5.keytab
KVNO Principal
---- --------------------------------------------------------------------------
   3 COMPUTER$@DOMAIN.EXAMPLE.COM
   3 COMPUTER$@DOMAIN.EXAMPLE.COM
   3 COMPUTER$@DOMAIN.EXAMPLE.COM
   3 COMPUTER$@DOMAIN.EXAMPLE.COM
   3 COMPUTER$@DOMAIN.EXAMPLE.COM
   3 HOST/COMPUTER@DOMAIN.EXAMPLE.COM
   3 HOST/COMPUTER@DOMAIN.EXAMPLE.COM
   3 HOST/COMPUTER@DOMAIN.EXAMPLE.COM
   3 HOST/COMPUTER@DOMAIN.EXAMPLE.COM
   3 HOST/COMPUTER@DOMAIN.EXAMPLE.COM
   3 HOST/computer.example.com@DOMAIN.EXAMPLE.COM
   3 HOST/computer.example.com@DOMAIN.EXAMPLE.COM
   3 HOST/computer.example.com@DOMAIN.EXAMPLE.COM
   3 HOST/computer.example.com@DOMAIN.EXAMPLE.COM
   3 HOST/computer.example.com@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/COMPUTER@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/COMPUTER@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/COMPUTER@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/COMPUTER@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/COMPUTER@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/computer.example.com@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/computer.example.com@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/computer.example.com@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/computer.example.com@DOMAIN.EXAMPLE.COM
   3 RestrictedKrbHost/computer.example.com@DOMAIN.EXAMPLE.COM



You should be able to authenticate using the keytab. You should not be prompted for a password, and no error message, when you run this command:

# kinit -k 'COMPUTER$@DOMAIN.EXAMPLE.COM'

More: No domain specified

  • You should be able to do the above without specifying a domain.
# adcli join --login-user=Administrator --domain-controller=10.10.10.10
  • In practice (real world) always know the domains you're joining.

Troubleshooting

  • Move your resolv.conf back:
# mv /etc/resolv.conf.bak /etc/resolv.conf
  • Use the --verbose argument to provide output when troubleshooting or reporting bugs.
  • In the kinit line above, make sure you have the dollar sign, are using the short computer name, and have everything capitalized as expected.