Require user account setup during kickstart install before %post?

Andrew Simpson simpsonar77 at gmail.com
Tue Jun 29 13:55:17 UTC 2021


Thank you for that.  I have done something similar, but all in the %post.
I was hoping that there was a way to force the user to use the UI to enter
username and password, though.

I suppose moving this to %pre would then allow me to "set" the user account
in the main kickstart section using 'user ---name .....'



On Tue, Jun 29, 2021 at 1:15 AM Pushpendra Chavan <
chavanpushpendra at gmail.com> wrote:

> Hi,
>
> You can write a %pre script which would force ask user to enter username
> and password or any other information and then write that information down
> in a /tmp/somefile.txt
> Then continue the installation, and in %post section, first %post would be
> with --nochroot  where it will copy that text file to
> /mnt/sysimage/somelocation
> And then from that location, it would utilize that information and act
> accordingly.
>
> You can write the %pre section as follows. I have tested this on RHEL7
>
> %pre
> exec < /dev/tty7 > /dev/tty7
> chvt 7
> echo "Enter Manual Information in given format"
> read MYINFO
> echo $MYINFO >/tmp/test
> chvt 1
>
> %end
>
> KICKSTART BODY
>
>
> %post --nochroot
>
> mv /tmp/test /mnt/sysimage/tmp/test
>
> %end
>
>
> %post
>
> # Use /tmp/test to perform %post actions
>
> %end
>
>
>
> *Thanks,*
> *Pushpendra Chavan.*
>
>
>
> On Tue, Jun 29, 2021 at 1:39 AM Andrew Simpson <simpsonar77 at gmail.com>
> wrote:
>
>> Is it possible to require/force a user to enter in their user account
>> information before the install gets to the %post section via the graphical
>> installer?  I need everything else to be automated, except this step, and
>> need to modify that user's groups in the "post" section.  It appears that
>> if nothing is entered via the GUI during install, that the install will
>> complete without it.  (root is setup as part of the ks).
>> _______________________________________________
>> Kickstart-list mailing list
>> Kickstart-list at redhat.com
>> https://listman.redhat.com/mailman/listinfo/kickstart-list
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://listman.redhat.com/mailman/listinfo/kickstart-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20210629/675b45e9/attachment.htm>


More information about the Kickstart-list mailing list