Posted on 09-22-2015 03:36 PM
I'm trying to get a Self Service entry set up for my users that:
Removes a older .mobileconfig file that should no longer be used.
Installs a .mobileconfig file
Deletes 2 Wireless Networks for the user
Deletes the keychain entries for said 2 wireless Networks for the user
I have the various parts Working in ARD; but I don't know how to put it together in Casper to create a Self-Service entry.
Screenshots for:
Copy .mobileconfig
Remove SSID's
Installs mobileconfig as root
I can get the .mobileconfig file installed into the JSS, that's no problem.
I'm trying to set up a Self Service Entry that a user could just click on, and all this is done for them.
Also excellent would be a pop-up afterwards saying "Now that your Wireless is reset, you have to log back on. Please select (WiFi Group) and enter your username (first.last@domain.org) and password"
My machines are all less than 1.5 years old Air's and Macbook Pro's Retina.
If you have any advice on putting this all together as a single self-service entry, it would be appreciated.
Thanks!
Posted on 09-22-2015 04:11 PM
If you want to have the profile copied to the machine, rather than the JSS managing the mobileconfig profile you can do the following steps:
Prep Work:
Setup:
My Modified Script:
#!/bin/sh
loggedInUser=`python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");'`
sudo su $loggedInUser
<<enter the rest of your script>>
Edit: It should be noted that I wrote this up going off memory and without testing the script. I apologize ahead of time if this does not work on the first try.
Posted on 09-23-2015 12:31 AM
@macdsl just a quick tip. JAMF commands/policies run as root.
So if testing via ARD run all as root.
The above screenshots you posted had some running as the user.
Also, accessing another users keychain can sometimes be problematic.