Compare commits
No commits in common. "935cfc0979691cba6d68299186568832a7d8f8fc" and "2fef0f1c9f0b1507e416ab90480ff4bd56231103" have entirely different histories.
935cfc0979
...
2fef0f1c9f
2
docs/slapd/.gitignore
vendored
2
docs/slapd/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
acladd.ldif
|
|
||||||
*gpg
|
|
@ -3,5 +3,7 @@
|
|||||||
READUSERS=""
|
READUSERS=""
|
||||||
for i in $(cat servicesaccounts.txt); do READUSERS="$READUSERS by dn=\"$i\" read" ; done
|
for i in $(cat servicesaccounts.txt); do READUSERS="$READUSERS by dn=\"$i\" read" ; done
|
||||||
|
|
||||||
sed 's/READUSERS/'"$READUSERS"'/g' acladd-template.ldif > acladd.ldif
|
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
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function genpass(){
|
GENPASS=$( echo $(shuf ../../scripts/shared/english.txt | head) | sed "s/ //g")
|
||||||
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 creds/$(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 $(echo -n $i | cut -d"," -f 1 | cut -d"=" -f2).gpg ; done
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## Add accounts and shared folder for two users given as two arguments $1 and $2
|
## Add accounts and shared folder for two users given as two arguments $1 and $2
|
||||||
|
|
||||||
DMZKEYFILE=$(echo -n ~)"/.ssh/dmz"
|
|
||||||
|
|
||||||
USER1=$1
|
USER1=$1
|
||||||
USER2=$2
|
USER2=$2
|
||||||
HOST="$3"
|
HOST="$3"
|
||||||
@ -21,5 +19,4 @@ if [[ -z "$HOST" ]]; then
|
|||||||
HOST="dmzkrovsshfs12"
|
HOST="dmzkrovsshfs12"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ssh-add -t 100 $DMZKEYFILE
|
torsocks ssh $HOST "adduser $USER1 ; adduser $USER2 ; groupadd $USER1$USER2 ; adduser $USER2 $USER1$USER2 ; adduser $USER1 $USER1$USER2 ; mkdir /var/shareddirs/$USER1$USER2 ; chown $USER1:$USER1$USER2 /var/shareddirs/$USER1$USER2 ; chmod 2770 /var/shareddirs/$USER1$USER2 "
|
||||||
torsocks ssh $HOST "adduser $USER1 ; adduser $USER2 ; groupadd $USER1$USER2 ; adduser $USER2 $USER1$USER2 ; adduser $USER1 $USER1$USER2 ; mkdir -p /var/shareddirs/$USER1$USER2 ; chown $USER1:$USER1$USER2 /var/shareddirs/$USER1$USER2 ; chmod 2770 /var/shareddirs/$USER1$USER2 "
|
|
||||||
|
Loading…
Reference in New Issue
Block a user