comparison test.bash @ 2:8dd68d722fa8

add ldif converters
author carl
date Sun, 11 Jul 2004 13:31:02 -0700
parents
children
comparison
equal deleted inserted replaced
0:6b1b602514db 2:8dd68d722fa8
1 #!/bin/bash
2
3 #scp ams:/usr/usr/USR/USR/STAN/NNdbase.txt .
4 #scp ams:/usr/usr/USR/USR/STAN/outlook.pst .
5
6 make
7 f=/home/ldap/ams.ldif
8 ./pst2ldif -b 'o=ams-cc.com, c=US' -c 'newPerson' outlook.pst >$f
9 dos2unix <NNdbase.txt | ./nick2ldif -b 'o=ams-cc.com, c=US' -c 'newPerson' >>$f
10 less $f
11 (
12 cd /home/ldap
13 /etc/rc.d/init.d/ldap stop
14 d=data/ams-cc.com
15 rm -rf $d
16 mkdir $d
17 chown ldap:ldap $d
18 /etc/rc.d/init.d/ldap start
19 sleep 5
20 ldapadd -c -x -D 'cn=root, o=ams-cc.com, c=US' -w 'summer-unmade' -v <$f >$f.log 2>&1
21 ldapsearch -z 0 -x -D 'cn=root, o=ams-cc.com, c=US' -w 'summer-unmade' -v -b 'o=ams-cc.com, c=US' 'objectclass=*' | grep -v '^#' >$f.all
22
23 )