summaryrefslogtreecommitdiffstats
path: root/mga-useredit
diff options
context:
space:
mode:
Diffstat (limited to 'mga-useredit')
-rwxr-xr-xmga-useredit22
1 files changed, 22 insertions, 0 deletions
diff --git a/mga-useredit b/mga-useredit
new file mode 100755
index 0000000..892f793
--- /dev/null
+++ b/mga-useredit
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+cLDAP_URL="ldaps://ldap.mageia.org"
+cLDAP_BASE_DN="ou=People,dc=mageia,dc=org"
+
+if [ "x$USER" == "xroot" ]
+then
+ echo "Please what's your LDAP uid ?"
+ read -a vUID
+else
+ vUID=$USER
+fi
+
+if [ "x$1" == "x" ]
+then
+ echo "Please give the uid you want to edit ?"
+ read -a vEDIT_UID
+else
+ vEDIT_UID=$1
+fi
+
+/usr/bin/ldapvi -q --tls allow -h ${cLDAP_URL} -D "uid=${vUID},${cLDAP_BASE_DN}" -b "uid=${vEDIT_UID},${cLDAP_BASE_DN}"