You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2013/06/28 10:32:42 UTC
svn commit: r1497677 -
/incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/resources/scripts/keytabs.sh
Author: srimanth
Date: Fri Jun 28 08:32:42 2013
New Revision: 1497677
URL: http://svn.apache.org/r1497677
Log:
AMBARI-2519. Add download CSV action for security wizard. (srimanth)
Modified:
incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/resources/scripts/keytabs.sh
Modified: incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/resources/scripts/keytabs.sh
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/resources/scripts/keytabs.sh?rev=1497677&r1=1497676&r2=1497677&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/resources/scripts/keytabs.sh (original)
+++ incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/resources/scripts/keytabs.sh Fri Jun 28 08:32:42 2013
@@ -64,7 +64,7 @@ processCSVFile () {
if [[ $seenHosts != *$hostName* ]]; then
echo "mkdir -p ./keytabs_$hostName" >> commands.mkdir;
- echo "chmod 655 ./keytabs_$hostName" >> commands.chmod;
+ echo "chmod 755 ./keytabs_$hostName" >> commands.chmod;
echo "chown -R root:hadoop `pwd`/keytabs_$hostName" >> commands.chown.1
echo "chmod -R g+rX,o= `pwd`/keytabs_$hostName" >> commands.chmod.1
seenHosts="$seenHosts$hostName";
@@ -74,7 +74,11 @@ processCSVFile () {
echo -e "kadmin.local -q \"addprinc -randkey $principal\"" >> commands.addprinc;
newKeytabFile=${keytabFile/\/etc\/security\/keytabs/`pwd`/keytabs_$hostName}
echo -e "kadmin.local -q \"xst -k $newKeytabFile $principal\"" >> commands.xst;
- echo "chmod 400 $newKeytabFile" >> commands.chmod.2
+ if [ "$service" == "SPNEGO User" ]; then
+ echo "chmod 440 $newKeytabFile" >> commands.chmod.2
+ else
+ echo "chmod 400 $newKeytabFile" >> commands.chmod.2
+ fi
if [ "$service" == "NameNode" -o "$service" == "SNameNode" -o "$service" == "Ambari HDFS Test User" -o "$service" == "DataNode" ]; then
echo "chown hdfs:hadoop $newKeytabFile" >> commands.chown.1