Created
April 17, 2015 22:15
-
-
Save andrewwippler/3eb28284614843ea1fc6 to your computer and use it in GitHub Desktop.
Join Centos 6 to Domian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NETBIOS="$1" | |
FQDN="$2" | |
USER="$3" | |
#install files | |
sudo yum -y install authconfig krb5-workstation pam_krb5 samba-winbind oddjob-mkhomedir nscd | |
#create auth settings | |
authconfig --enablecachecreds --enablewinbind --enablewinbindauth --smbsecurity=ads --smbworkgroup=$NETBIOS --smbrealm=$FQDN --enablewinbindusedefaultdomain --winbindtemplatehomedir=/home/$NETBIOS/%U --winbindtemplateshell=/bin/bash --enablekrb5 --krb5realm=$FQDN --enablekrb5kdcdns --enablekrb5realmdns --enablelocauthorize --enablemkhomedir --enablepamaccess --updateall | |
#join | |
net ads join $FQDN -U $USER | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment