I am trying to install Fedora 30 using kickstart, and accept user input for a username and password during the %post section. Previously I was using whiptail in Centos 7 but it doesn’t appear to be available anymore in newer boot images or Fedora.
Would anyone have an example of how to do a kickstart install, and in the %post section prompt the user for a username, and password, and then do something with it? (For example authenticate with LDAP).
I’ve done some further testing. For some reason if I do this in the post section (below), it doesn’t seem to switch the user to a console and ask for input. But if I put the same codeblock in a “pre” section it works and accepts the user input, and then switches back to graphical install. Maybe I just have the chvt numbers backwords or wrong?
The Pre section is not ideal for me, because the authentication needs to happen after packages have been installed.
I ended up moving it over to using zenity. It appears that if I include zenity in the packages section of the kickstart I can then do this in the post section (Without switching tty) which is a lot better:
# Do some additional configuration
%post --interpreter=/usr/bin/bash
IFS='|' read user pw < <( zenity --password --username )
echo $?
echo $user $pw
# Putting credentials into text file just for test.
echo "Username: ${user}" >> /root/creds.txt
echo "Password: ${pw}" >> /root/creds.txt
%end