Automatic realm join during kickstart

by excessive   Last Updated January 12, 2018 22:00 PM

I need help in automation of joining CentOS hosts to working samba AD server. I've used winbind succesfully with the following command in a script

net ads join -U Administrator%Passwordhere

but now I switched over to SSSD because its easier, quicker and more robust way. Unfortunately I cannot manage to automate the command

realm join

because I can't pass the pw as argument in a command or script. Also the command seems to fail during kickstart because of the generic hostname (localhost.localdomain). So I've tried putting in script, executed via rc.local. Unfortunately that works only sometimes. For some reason sometimes it takes like 2-3 reboots for the script to have effect on the machine.

I'd appreciate some advices

Related Questions

PAM accepting any password for valid users

Updated December 29, 2017 16:00 PM

SSSD authenticate against parent domain

Updated December 10, 2018 16:00 PM