Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r121 - trunk/scripts/admin

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r121 - trunk/scripts/admin


Chronological Thread 
  • From: "AFS account Roman Geus" <geus AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r121 - trunk/scripts/admin
  • Date: Tue, 10 Jun 2008 15:33:09 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: geus
Date: Tue Jun 10 15:33:08 2008
New Revision: 121

Log:
Added new script idok_admin_bulk.sh

Added:
trunk/scripts/admin/idok_admin_bulk.sh (contents, props changed)

Added: trunk/scripts/admin/idok_admin_bulk.sh
==============================================================================
--- (empty file)
+++ trunk/scripts/admin/idok_admin_bulk.sh Tue Jun 10 15:33:08 2008
@@ -0,0 +1,37 @@
+#! /bin/bash
+#
+# A tool for assisting bulk changes in the iDok authorization database.
+#
+# Example:
+#
+# /afs/psi.ch/project/dms/admin/prod/opt/dms/idok_admin query | \
+# grep ait | \
+# scripts/admin/idok_admin_bulk.sh \
+# /afs/psi.ch/project/dms/admin/qa/opt/dms/idok_admin grant
+#
+
+if [ "$#" -ne "2" ]; then
+ echo "usage: $0 IDOK_ADMIN_CMD [ grant | group ]"
+ exit 1
+fi
+
+idok_admin_cmd=$1
+command=$2
+
+case $command in
+ group )
+ while read user_name group_name ; do
+ cmd="$idok_admin_cmd group --add $user_name $group_name"
+ echo $cmd
+ done
+ ;;
+ grant )
+ while read user_name task action ; do
+ cmd="$idok_admin_cmd grant $user_name $task $action"
+ echo $cmd
+ done
+ ;;
+ * )
+ echo "Unsupported command: $command"
+ exit 1
+esac



  • [idok-commit] idok commit r121 - trunk/scripts/admin, AFS account Roman Geus, 06/10/2008

Archive powered by MHonArc 2.6.19.

Top of Page