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
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