After each server creation (we use centos), I must tape this line manually to join AD (via kerberos):

#kinit user
#net ads keytab create -U user
#net ads join DOMAIN.COM -U USER createcomputer=$ldapPath
#klist -k 
#authconfig --enablesssdauth --enablesssd --enablemkhomedir --smbsecurity=ads --smbworkgroup=DOMAIN --smbrealm=DOMAIN.COM  --enablekrb5 --krb5realm=DOMAIN.COM --enablekrb5kdcdns --enablekrb5realmdns --enablelocauthorize --enablemkhomedir --enablepamaccess --updateall
#systemctl restart sssd

I am a looking for a method to automate those action and integrate them on postinstall script. some idea please ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.