From Fedora Project Wiki
(Initial page about kickstart testing) |
(Include actual ks.cfg, add delete-computer troubleshooting) |
||
Line 4: | Line 4: | ||
# Fulfill the [[QA:Testcase_realmd_prerequisites|prerequisites and make sure your Active Directory domain access works]]. | # Fulfill the [[QA:Testcase_realmd_prerequisites|prerequisites and make sure your Active Directory domain access works]]. | ||
# Precreate a computer account in the domain with a one time password using adcli: | # Precreate a computer account in the domain with a one time password using adcli: | ||
#: <pre>$ adcli preset-computer --one-time-password=MyPassword --domain ad.example.com anaconda1</pre> | #: <pre>$ adcli preset-computer --one-time-password=MyPassword --domain=ad.example.com anaconda1</pre> | ||
#: The computer name above must match the name in the ks.cfg file below. | #: The computer name above must match the name in the ks.cfg file below. | ||
#: Replace your domain name. | #: Replace your domain name. | ||
# Download this ISO file: [http://vpodzime.fedorapeople.org/realm_support_testing/boot.iso boot.iso] | # Download this ISO file: [http://vpodzime.fedorapeople.org/realm_support_testing/boot.iso boot.iso] | ||
# Create a new virtual machine withan 8G disk, 1G of RAM, and use the above file as the boot ISO. | # Create a new virtual machine withan 8G disk, 1G of RAM, and use the above file as the boot ISO. | ||
# Prepare | # Prepare the kickstart file | ||
#: | #: Place the text below into a file, replacing your domain name into the <code>realm</code> command | ||
#: Upload the ks.cfg file to your fedorapeople.org account or some other accessible http server. | #: Upload the ks.cfg file to your fedorapeople.org account or some other accessible http server. | ||
<pre>bootloader --location=mbr | |||
network --bootproto=dhcp --hostname=anaconda1 | |||
install | |||
timezone Europe/Prague | |||
lang en_US.UTF-8 | |||
keyboard dvorak | |||
clearpart --all | |||
autopart | |||
realm join --one-time-password=MyPassword borg.thewalter.lan | |||
%packages | |||
vim | |||
%end | |||
rootpw anaconda | |||
</pre> | |||
|actions= | |actions= | ||
# Start your new virtual machine you prepared above | # Start your new virtual machine you prepared above | ||
Line 61: | Line 74: | ||
* You currently need to use the boot.iso downloaded above, the standard Fedora beta will not work. | * You currently need to use the boot.iso downloaded above, the standard Fedora beta will not work. | ||
* If the <code>adcli preset-computer</code> command above complains about the computer account already existing, you can delete it with a command like this: | |||
<pre>$ adcli delete-computer --domain=ad.example.com anaconda1</pre> | |||
[[Category:Active_Directory_Test_Cases]] [[Category:Realmd_Test_Cases]] | [[Category:Active_Directory_Test_Cases]] [[Category:Realmd_Test_Cases]] |
Revision as of 09:38, 8 May 2013
Description
Join the current machine to an Active Directory using Anaconda's kickstart.
Setup
- Fulfill the prerequisites and make sure your Active Directory domain access works.
- Precreate a computer account in the domain with a one time password using adcli:
$ adcli preset-computer --one-time-password=MyPassword --domain=ad.example.com anaconda1
- The computer name above must match the name in the ks.cfg file below.
- Replace your domain name.
- Download this ISO file: boot.iso
- Create a new virtual machine withan 8G disk, 1G of RAM, and use the above file as the boot ISO.
- Prepare the kickstart file
- Place the text below into a file, replacing your domain name into the
realm
command - Upload the ks.cfg file to your fedorapeople.org account or some other accessible http server.
- Place the text below into a file, replacing your domain name into the
bootloader --location=mbr network --bootproto=dhcp --hostname=anaconda1 install timezone Europe/Prague lang en_US.UTF-8 keyboard dvorak clearpart --all autopart realm join --one-time-password=MyPassword borg.thewalter.lan %packages vim %end rootpw anaconda
How to test
- Start your new virtual machine you prepared above
- At the Fedora boot loader install prompt, use the arrow keys to select Install Fedora 19 and press tab.
- Add the following to the end of the command line
updates=http://vpodzime.fedorapeople.org/realm_support_testing/iso_updates.img ks=http://path/to/the/ks.cfg
- Make sure to use the full path to the location you uploaded your custom ks.cfg file.
- Press enter to boot and run the installation.
Expected Results
- The boot should complete without prompting
- If you watch closely, before install you should see a status line saying that the realm is being discovered
- Again, after installation, you should see a status line joining the domain.
- Reboot the machine after installation
- Log in as root, using the root password in the ks.cfg
- Check if you are joined to the domain
realm list
- The domain should be listed
- Make note of the login format
- Check that domain accounts can be resolved
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 of DOMAIN\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
- 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 like HOSTNAME$@DOMAIN.
- There should be no output from this command.
- Try to log into the machine as a domain account at the console.
- This should automatically create a new home directory for the user, and log into a shell prompt.
More: Try it with FreeIPA
Use a FreeIPA domain with kickstart.
Instead of the adcli preset-computer
command, use the FreeIPA Web UI to precreate an account with the appropriate name.
Troubleshooting
- RHBZ #960887 The sssd service is configured to start automatically after the installation completes. Workaround:
$ sudo systemctl enable sssd.service
- You currently need to use the boot.iso downloaded above, the standard Fedora beta will not work.
- If the
adcli preset-computer
command above complains about the computer account already existing, you can delete it with a command like this:
$ adcli delete-computer --domain=ad.example.com anaconda1