How do I set the root password in a kickstart file?
Environment
- Red Hat Enterprise Linux 4 / 5 / 6
Issue
- How do I go about creating an encrypted password that is suitable for use in a kickstart file.
Resolution
- There are two options:
-
Set the password in plaintext in the kickstart using the
rootpwoption, but leaving out the--iscryptedflag. While it is unencrypted in the kickstart file it will be encrypted on the installed system in/etc/shadow. -
Using the
md5passutility that is in thesyslinuxpackage and then passing the resulting string to therootpw --iscryptedoption in the kickstart.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
