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 11:19:36 UTC

svn commit: r1497693 - /incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/resources/scripts/keytabs.sh

Author: srimanth
Date: Fri Jun 28 09:19:36 2013
New Revision: 1497693

URL: http://svn.apache.org/r1497693
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=1497693&r1=1497692&r2=1497693&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 09:19:36 2013
@@ -72,48 +72,48 @@ processCSVFile () {
         
         if [[ $seenPrincipals != *$principal* ]]; then
           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;
-          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
-          fi
-          
-          if [ "$service" == "TaskTracker" -o "$service" == "JobTracker" ]; then
-            echo "chown mapred:hadoop $newKeytabFile" >> commands.chown.1
-          fi
-          
-          if [ "$service" == "Ambari Smoke Test User" ]; then
-            echo "chown ambari-qa:hadoop $newKeytabFile" >> commands.chown.1
-          fi
-          
-          if [ "$service" == "ZooKeeper Server" ]; then
-            echo "chown zookeeper:hadoop $newKeytabFile" >> commands.chown.1
-          fi
-          
-          if [ "$service" == "HiveServer2" ]; then
-            echo "chown hive:hadoop $newKeytabFile" >> commands.chown.1
-          fi
-          
-          if [ "$service" == "Oozie Server" ]; then
-            echo "chown oozie:hadoop $newKeytabFile" >> commands.chown.1
-          fi
-          
-          if [ "$service" == "Nagios Server" ]; then
-            echo "chown nagios:hadoop $newKeytabFile" >> commands.chown.1
-          fi
-          
-          if [ "$service" == "Ambari HBase Test User" -o "$service" == "HBase RegionServer" -o "$service" == "HBase Master" ]; then
-            echo "chown hbase:hadoop $newKeytabFile" >> commands.chown.1
-          fi
-          
           seenPrincipals="$seenPrincipals$principal"
         fi
+        
+        newKeytabFile=${keytabFile/\/etc\/security\/keytabs/`pwd`/keytabs_$hostName}
+        echo -e "kadmin.local -q \"xst -k $newKeytabFile $principal\"" >> commands.xst;
+        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
+        fi
+        
+        if [ "$service" == "TaskTracker" -o "$service" == "JobTracker" ]; then
+          echo "chown mapred:hadoop $newKeytabFile" >> commands.chown.1
+        fi
+        
+        if [ "$service" == "Ambari Smoke Test User" ]; then
+          echo "chown ambari-qa:hadoop $newKeytabFile" >> commands.chown.1
+        fi
+        
+        if [ "$service" == "ZooKeeper Server" ]; then
+          echo "chown zookeeper:hadoop $newKeytabFile" >> commands.chown.1
+        fi
+        
+        if [ "$service" == "HiveServer2" ]; then
+          echo "chown hive:hadoop $newKeytabFile" >> commands.chown.1
+        fi
+        
+        if [ "$service" == "Oozie Server" ]; then
+          echo "chown oozie:hadoop $newKeytabFile" >> commands.chown.1
+        fi
+        
+        if [ "$service" == "Nagios Server" ]; then
+          echo "chown nagios:hadoop $newKeytabFile" >> commands.chown.1
+        fi
+        
+        if [ "$service" == "Ambari HBase Test User" -o "$service" == "HBase RegionServer" -o "$service" == "HBase Master" ]; then
+          echo "chown hbase:hadoop $newKeytabFile" >> commands.chown.1
+        fi
     done;
     
     echo ""