How do I set the root password in a kickstart file?

Solution Unverified - Updated -

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:
  1. Set the password in plaintext in the kickstart using the rootpw option, but leaving out the --iscrypted flag. While it is unencrypted in the kickstart file it will be encrypted on the installed system in /etc/shadow.

  2. Using the md5pass utility that is in the syslinux package and then passing the resulting string to the rootpw --iscrypted option 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.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.