Home Forums AFP548 Community Ideas Remote AD Binder, via AppleScript Studio (is it possible?)

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #363427
    shimpeno
    Participant

    I have been trying to get a AppleSCript Studio App working that would use NIB text fiels entered by the user to ssh into a 10.4 client and then use dsconfigad to bind to Active Directory. So far, it ain’t workin. I am going to post the AppleSript below in hopes that some of the wrinkles that I am sure that I have made migh be ironed out. All you would need to do is create a new AppleScript Studio App, throw together a window with six text fields and a button, hook them up to my script and try to get that sucka workin. I get stuck at the SSH into remote box.

    — FAU AD Remote Binder.applescript
    — FAU AD Remote Binder

    — Created by Peter Shimpeno on 9/21/05.
    — Copyright 2005 http://peter.shimpeno.com – All rights reserved.

    on clicked theObject

    — Declare your values
    tell window “main”
    set RemoteName to contents of text field “Remote Name”
    set IPaddress to contents of text field “IP address”
    –set RemotePass to contents of text field “Remote Pass”
    set ComputerID to contents of text field “Computer ID”
    set DomainUserName to contents of text field “Domain User Name”
    set DomainPass to contents of text field “Domain Pass”

    — first we need to use the Remote username to “ssh” into the remote IP address
    do shell script “/usr/bin/ssh -l ” & RemoteName & ” ” & IPaddress & “”

    — wait 8 seconds
    delay 8

    — If this is the first time, enter yes to the RSA question
    — do shell script “yes”

    — wait 3 seconds
    — delay 3

    — enter the password
    –(contents of text field “RemotePass” of window “main” as string)
    do shell script “” & RemotePass & “”

    — wait 3 seconds
    delay 3

    — enter the Directory Services command line tool with proper default flags
    — the username and password for the remote machine and domain admin are used.
    do shell script “/usr/sbin/dsconfigad -a ” & ComputerID & ” -domain irm.ad.fau.edu -u ” & DomainUserName & ” -p ” & DomainPass & ” -lu ” & RemoteName & ” -lp ” & RemotePass & ” -mobileconfirm disable -localhome enable -useuncpath disable -alldomains enable -nopreferred”

    — wait 8 seconds
    delay 8
    end tell

    end clicked

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Comments are closed