aboutsummaryrefslogtreecommitdiff
path: root/scripts/hedgedoc-ldap_to_oauth2/ldap_users.sh
diff options
context:
space:
mode:
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