2024-08-12 17:26:50 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -f "${HOME}/password-store/ldap.password" ]; then
|
|
|
|
searchopts="-y ${HOME}/password-store/ldap.password"
|
|
|
|
else
|
|
|
|
searchopts="-W"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$USER" == 'root' ]; then
|
|
|
|
alias ldapsearch="/usr/bin/ldapsearch -x -b 'dc=aninix,dc=net'"
|
|
|
|
else
|
|
|
|
alias ldapsearch="/usr/bin/ldapsearch -H 'ldap://127.0.0.1/' ${searchopts} -D 'uid=$USER,ou=People,dc=aninix,dc=net' -b dc=aninix,dc=net"
|
|
|
|
fi
|
2024-08-18 15:10:53 -05:00
|
|
|
alias ldapmodify="/usr/bin/ldapmodify -H 'ldap://127.0.0.1/' -W -D 'cn=root,dc=aninix,dc=net'"
|
|
|
|
alias ldappasswd="/usr/bin/ldappasswd -H 'ldap://127.0.0.1/' -W -D 'cn=root,dc=aninix,dc=net'"
|
|
|
|
alias ldapadd="/usr/bin/ldapadd -H 'ldap://127.0.0.1/' -W -D 'cn=root,dc=aninix,dc=net'"
|