aboutsummaryrefslogtreecommitdiff
path: root/scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh
diff options
context:
space:
mode:
authorLukas Oertel2023-01-22 18:12:17 +0100
committerLukas Oertel2023-01-22 18:12:17 +0100
commite23a1db405b5181f66d2fad6636f89ec2c30948f (patch)
tree7953f44f081dbb133e01163f0c7a2278bdbb2df7 /scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh
parentedf1ec190d2125ac5dbdd38635bc0b09f6c71033 (diff)
scripts/hedgedoc-ldap_to_oauth2: Init
Diffstat (limited to 'scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh')
-rw-r--r--scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh b/scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh
new file mode 100644
index 0000000..8d05fa5
--- /dev/null
+++ b/scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+while read p; do
+ USER=`echo $p | sed 's/\s.*$//'`
+ ID=`echo $p | sed 's/.* //'`
+ echo $USER $ID
+ sed 's/$UID/'$USER'/g' replacements.txt | sed 's/$LDAPID/'$ID'/g' - >> replacements.sql
+done <ldap_users.txt