Kickstart accepts root and user passwords in plain text format, but it is not secured. So we can simply encrypt root or user passwords and then we can copy past the encrypted string.

Here are the steps to do it using openssl :

gil@vbox:~$  openssl passwd -1 "my_password"

$1$8Bp07Gnl$AfQOAkbM.YfXQ5SMBnWry0

simply copy paste the encrypted string in the kickstart file and you are done.

rootpw   --iscrypted  $1$8Bp07Gnl$AfQOAkbM.YfXQ5SMBnWry0

gil ...