AFP548 Changing the world one server at a time.

sggr57a

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: 802.1x Login Window Profile.. #377699
    sggr57a
    Participant

    This is something I set up for my district to enable clients to authenticate to machines using their ad credentials. We use peap, ttls and md5 for authentication though this may be too much encryption than you need. We use wpa2 enterprise for our security type and a root ca to doll out the cert. Apple mentioned that the certificate must be in pem format when it copies to the machine or it won’t work. Note that I’ve changed some variables so you can use your own ssid and cert. I hope this helps everyone. I’m also known as johnmcl1 on this forum if anyone needs to contact me.

    #!/bin/sh

    # Set up some variables…
    wireless=wifissid
    uuid=`uuidgen`
    netuuid=`uuidgen`
    setuuid=`cat /Library/Preferences/SystemConfiguration/preferences.plist | grep /Sets/ | cut -c 16-51`

    # Define the plist files for easier reference…
    EAPLoginWindow=/Library/Preferences/SystemConfiguration/preferences.plist

    # Configuring the Login Window settings…
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport dict” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:JoinMode string Automatic” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:JoinModeFallback array” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:JoinModeFallback:0 string Prompt” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:PowerEnabled bool Yes” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:PreferredNetworks array” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:PreferredNetworks:0 dict” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:PreferredNetworks:0:SSID_STR string $wireless” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:PreferredNetworks:0:SecurityType string WPA2\ Enterprise” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:PreferredNetworks:0:Unique\ Network\ ID string $netuuid” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:Airport:RememberRecentNetworks bool Yes” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow dict” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid dict” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:EAPClientConfiguration dict” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:EAPClientConfiguration:AcceptEAPTypes array” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:EAPClientConfiguration:AcceptEAPTypes:0 integer 4” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:EAPClientConfiguration:AcceptEAPTypes:0 integer 25” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:EAPClientConfiguration:AcceptEAPTypes:0 integer 21” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:UniqueIdentifier string $uuid” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:UserDefinedName string $wireless” $EAPLoginWindow
    /usr/libexec/PlistBuddy -c “Add :Sets:$setuuid:Network:Interface:en1:EAPOL.LoginWindow:$uuid:Wireless\ Network string $wireless” $EAPLoginWindow

    # Add certificate to trusted list
    security add-trusted-cert -d -r trustRoot -p eap -k “/Library/Keychains/System.keychain” “/private/var/tmp/cert.some.domain.pem”

    exit 0

Viewing 1 post (of 1 total)