add docs for slapd and dmzrsaccount
This commit is contained in:
18
docs/slapd/README.md
Normal file
18
docs/slapd/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
Create ldap users at dmz.rs/account for users in the servicesaccounts.txt
|
||||
these accounts should be listed in /root/ldifs/addacl.ldif
|
||||
to generate addacl.ldif run generateacl.sh
|
||||
|
||||
add tls keys in /etc/ssl/certs/ldap.krov.dmz.rs
|
||||
|
||||
# Generate password for admin user on this server only and add it when asked during installation
|
||||
apt install slapd
|
||||
|
||||
# For domain set dmz.rs for Organization set Users for admin password use previously generated password
|
||||
dpkg-reconfigure slapd
|
||||
|
||||
# change /etc/default/slapd to replace ldap:// with ldaps:// under SLAPD_SERVICES
|
||||
service slapd restart
|
||||
./setup.sh
|
||||
|
||||
dmzrsaccount vm should run prepare.py
|
||||
ldapsync vm should run sync.py
|
18
docs/slapd/acladd-template.ldif
Normal file
18
docs/slapd/acladd-template.ldif
Normal file
@@ -0,0 +1,18 @@
|
||||
dn: olcDatabase={1}mdb,cn=config
|
||||
add: olcAccess
|
||||
olcAccess: {1}to attrs=userPassword by self write by anonymous auth
|
||||
|
||||
dn: olcDatabase={1}mdb,cn=config
|
||||
add: olcAccess
|
||||
#olcAccess: {2}to * by * none
|
||||
olcAccess: {2}to * by self write READUSERS by anonymous none
|
||||
|
||||
dn: olcDatabase={-1}frontend,cn=config
|
||||
add: olcAccess
|
||||
olcAccess: {1}to attrs=userPassword by self write by anonymous auth
|
||||
|
||||
dn: olcDatabase={-1}frontend,cn=config
|
||||
add: olcAccess
|
||||
#olcAccess: {2}to * by * none
|
||||
olcAccess: {2}to * by self READUSERS by anonymous none
|
||||
|
9
docs/slapd/generateacl.sh
Executable file
9
docs/slapd/generateacl.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
READUSERS=""
|
||||
for i in $(cat servicesaccounts.txt); do READUSERS="$READUSERS by dn=\"$i\" read" ; done
|
||||
|
||||
sed 's/READUSERS/$READUSERS/g' acladd-template.ldif > acladd.ldif
|
||||
|
||||
for i in $(cat list) ; do printf "%s\n" $(echo -n $i | cut -d"," -f 1 | cut -d"=" -f2 ; genpass) | gpg -e -r fram3d@dmz.rs -r sienna@dmz.rs --output $(echo -n $i | cut -d"," -f 1 | cut -d"=" -f2).gpg ; done
|
||||
|
6
docs/slapd/generatecreds.sh
Executable file
6
docs/slapd/generatecreds.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
GENPASS=$( echo $(shuf ../../scripts/shared/english.txt | head) | sed "s/ //g")
|
||||
|
||||
for i in $(cat servicesaccounts.txt) ; do printf "%s\n" $(echo -n $i | cut -d"," -f 1 | cut -d"=" -f2 ; $(GENPASS)) | gpg -e -r fram3d@dmz.rs -r sienna@dmz.rs --output $(echo -n $i | cut -d"," -f 1 | cut -d"=" -f2).gpg ; done
|
||||
|
9
docs/slapd/servicesaccounts.txt
Normal file
9
docs/slapd/servicesaccounts.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
uid=readonlykrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=wikildapkrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=forumldapkrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=gitealdapkrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=xmppldapkrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=dovecotldapkrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=postfixldapkrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=smtpdldapkrov,ou=Users,dc=dmz,dc=rs
|
||||
uid=kralizecslapd,ou=Users,dc=dmz,dc=rs
|
Reference in New Issue
Block a user