-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy_cdep_kerberos_config.sh
More file actions
executable file
·37 lines (29 loc) · 1004 Bytes
/
copy_cdep_kerberos_config.sh
File metadata and controls
executable file
·37 lines (29 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
#
# copy the kerberos config from a cdep cluster
# See https://docs.google.com/document/d/1VjZ-U2HBGX4AFozWAHDk3qUh0NPhue4xersUSGK3pns for gory details
# Makes spnego work.
#
if [ "$#" -ne 1 ]
then
echo "usage $0 hostname"
exit 1
fi
HOST=$1
CONFIG=~/tmp/cdep_kerberos_$$
mkdir ${CONFIG}
cd ${CONFIG}
echo "Copying keytab files to ${CONFIG}"
scp -r -i ~/.ssh/systest_rsa systest@${HOST}:/cdep .
echo "Copying krb5.conf files to ${CONFIG}"
scp -r -i ~/.ssh/systest_rsa systest@${HOST}:/etc/krb5.conf .
echo "Overwriting /etc/krb5.conf"
sudo cp krb5.conf /etc/krb5.conf
echo "Copying certificate"
scp -r -i ~/.ssh/systest_rsa systest@${HOST}:/var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_cacerts.pem .
echo "Running 'kinit -kt cdep/keytabs/systest.keytab systest'"
kinit -kt cdep/keytabs/systest.keytab systest
echo "klist output:"
klist
echo "Impala-shell string"
echo "impala-shell -i ${HOST} -d default -k --ssl --ca_cert=${CONFIG}/cm-auto-global_cacerts.pem"