hey everyone...
I am scrapping my separate bind scripts and integrating them into my post image script. Since the computer name is set by Casper, and each name is unique to it's building I figured I'd use that to script it... Here it is:
#!/bin/bash
# use computer name to set bind location to replica server
case `/usr/sbin/networksetup -getcomputername` in
WYA*) /usr/sbin/dsconfigldap -a xs106-a.kckps.org; /usr/bin/dscl localhost -create /Search SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Search CSPSearchPath /LDAPv3/xs106-a.kckps.org; /usr/bin/dscl localhost -create /Contact SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Contact CSPSearchPolicy /LDAPv3/xs106-a.kckps.org;
;;
HAR*) /usr/sbin/dsconfigldap -a xs101-a.kckps.org; /usr/bin/dscl localhost -create /Search SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Search CSPSearchPath /LDAPv3/xs101-a.kckps.org; /usr/bin/dscl localhost -create /Contact SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Contact CSPSearchPolicy /LDAPv3/xs101-a.kckps.org;
;;
WHS*) /usr/sbin/dsconfigldap -a xs104-a.kckps.org; /usr/bin/dscl localhost -create /Search SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Search CSPSearchPath /LDAPv3/xs104-a.kckps.org; /usr/bin/dscl localhost -create /Contact SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Contact CSPSearchPolicy /LDAPv3/xs104-a.kckps.org;
;;
SAS*) /usr/sbin/dsconfigldap -a xs102-a.kckps.org; /usr/bin/dscl localhost -create /Search SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Search CSPSearchPath /LDAPv3/xs102-a.kckps.org; /usr/bin/dscl localhost -create /Contact SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Contact CSPSearchPolicy /LDAPv3/xs102-a.kckps.org;
;;
SCH*) /usr/sbin/dsconfigldap -a xs100-a.kckps.org; /usr/bin/dscl localhost -create /Search SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Search CSPSearchPath /LDAPv3/xs100-a.kckps.org; /usr/bin/dscl localhost -create /Contact SearchPolicy dsAttrTypeStandard:CSPSearchPath; /usr/bin/dscl localhost -merge /Contact CSPSearchPolicy /LDAPv3/xs100-a.kckps.org;
;;
esac
exit 0
These are vanilla binds, no authentication needed. When I run the script, it works and the client binds, but I get this error in terminal:
bash-3.2# sh bind_hs_client.sh
attribute status: eDSReadOnly
DS Error: -14121 (eDSReadOnly)
bash-3.2#
Upon inspecting the directory utility I see that it bound, and that the Search path is set to the replica server, but the contact path is not. I think this is causing the error out. Any ideas?
Once this is worked out, it will be added to my post image script, which I will update with other updates I have done to it and post it to the resource kit list.
Thanks
Tom