Last active
June 30, 2016 20:02
-
-
Save sierra-tango-echo/176c058b3afcc191a432d9337aa07783 to your computer and use it in GitHub Desktop.
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 | |
CLIENTNAME=login1 | |
CLUSTER=cluster1 | |
CLIENTIP=10.75.0.110 | |
ONETIMEPASS=moose | |
KEYTAB=/root/hadder.keytab | |
KEYUSER=hadder | |
DOMAIN=`hostname -d` | |
REALM=`echo $DOMAIN | sed -e 's/\(.*\)/\U\1/'` | |
kinit -kt $KEYTAB $KEYUSER@$REALM | |
ipa host-add $CLIENTNAME.$CLUSTER.$DOMAIN --ip-address=$CLIENTIP | |
ipa host-mod $CLIENTNAME.$CLUSTER.$DOMAIN --password "${ONETIMEPASS}" | |
ipa hostgroup-add-member usernodes --hosts $CLIENTNAME.$CLUSTER.$DOMAIN | |
kdestroy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment