fix slapd acl generation scripts
This commit is contained in:
		
							
								
								
									
										2
									
								
								docs/slapd/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								docs/slapd/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
acladd.ldif
 | 
			
		||||
*gpg
 | 
			
		||||
@@ -3,7 +3,5 @@
 | 
			
		||||
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
 | 
			
		||||
sed 's/READUSERS/'"$READUSERS"'/g' acladd-template.ldif > acladd.ldif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
GENPASS=$( echo $(shuf ../../scripts/shared/english.txt | head) | sed "s/ //g")
 | 
			
		||||
function 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
 | 
			
		||||
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 creds/$(echo -n $i | cut -d"," -f 1 | cut -d"=" -f2).gpg ; done
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user