Skip to main content
Question

OD bind script

  • February 20, 2012
  • 5 replies
  • 0 views

Forum|alt.badge.img+3

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

leslie_h
Forum|alt.badge.img+14
  • Employee
  • 100 replies
  • February 20, 2012

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


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 2 replies
  • February 20, 2012

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


Forum|alt.badge.img+31
  • Honored Contributor
  • 2721 replies
  • February 20, 2012

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.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 2 replies
  • February 20, 2012

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.... :-)


Forum|alt.badge.img+31
  • Honored Contributor
  • 2721 replies
  • February 20, 2012

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings