Skip to content

Instantly share code, notes, and snippets.

@sierra-tango-echo
Last active June 30, 2016 20:02
Show Gist options
  • Save sierra-tango-echo/176c058b3afcc191a432d9337aa07783 to your computer and use it in GitHub Desktop.
Save sierra-tango-echo/176c058b3afcc191a432d9337aa07783 to your computer and use it in GitHub Desktop.
#!/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