OD bind script

pharmon
New Contributor

Amendment to the post, we have got around the OD Bind by pushing the built in Casper Directory bind,
however prior to that running we need to remove and old OD bind that is failing and greyed out in Directory service.
We have been able to do this via ARD using the following script:

dsconfigldap -f -r odmaster.stleos.nsw.edu.au -u diradmin -p "password"
dscl /Search -delete / CSPSearchPath /LDAPv3/odmaster.stleos.nsw.edu.au

this is failing.
The event log reads:

/usr/sbin/jamf is version 8.31 Executing Policy Run Script remove OD.sh... Downloading http://casperserv.stleos.nsw.edu.au:80/CasperShare/Scripts//Re-Bind ODmaster.sh... Running Script Re-Bind ODmaster.sh... Script Exit Code:2 Script Result: /private/tmp/Re-Bind ODmaster.sh: line 1: {rtf1ansiansicpg1252cocoartf1138cocoasubrtf320: command not found
/private/tmp/Re-Bind ODmaster.sh: line 2: syntax error near unexpected token `}'
/private/tmp/Re-Bind ODmaster.sh: line 2: `{fonttblf0fswissfcharset0 Helvetica;}'

Downloading http://casperserv.stleos.nsw.edu.au:80/CasperShare/Scripts//remove OD.sh... Running Script remove OD.sh... Script Exit Code:2 Script Result: /private/tmp/remove OD.sh: line 1: {rtf1ansiansicpg1252cocoartf1138cocoasubrtf320: command not found
/private/tmp/remove OD.sh: line 2: syntax error near unexpected token `}'
/private/tmp/remove OD.sh: line 2: `{fonttblf0fswissfcharset0 Helvetica;}'

Any help much appreciated.
Thanks
Paul

5 REPLIES 5

leslie
Contributor II
Contributor II

Can you verify the script was saved as plain text, as opposed to rich text.

pharmon
New Contributor

Hmmm think you're right, it was rich text, having another go.
Thanks!

tlarkin
Honored Contributor

I used to use bind scripts to OD post image, but I switched to using the JSS to bind at imaging to ditch my scripts. I find that way more efficient personally.

pharmon
New Contributor

Yes I agree completely and we do do this on our imaging.
The issue I have here is my OD Master went down and over our summer break 500 odd MacBooks lost the bind, trying to resolve a quick way to rebind!
Thanks for your comments.
Have got the script roughly working now that I have got rid of the rich text!
Novice.... :-)

tlarkin
Honored Contributor

I may have my scripts still somewhere I can dig them up and post them. One was specifically written to remove all bindings and then rebind a clients based off of naming convention. Since we have 15 replicas different clients would bind to.