JAMF IT Open Source project

allenhouchins
New Contributor II
New Contributor II

Hi JAMF Nation -

We’re often asked by customers, the JAMF Nation community, and internal Sales and Support staff “How do we do X internally at JAMF?"

I’m excited to announce that the JAMF IT team has started open sourcing all of our scripts, code, and internally created utilities to share with JAMF Nation and the Mac Admin community: https://github.com/jamfit

Not only will we be posting our internally-created scripts, code, and utilities in an open source format for everyone to use, we’re also going to include information on how exactly we use the JSS to deploy and manage these items.

There are multiple ways to solve the challenges that we as IT practitioners face on a daily basis. We’re hoping that our solutions will give you ideas for your environment and hope to see everyone continue the conversations with the JAMF Nation community on how we solve these challenges together.

30 REPLIES 30

bentoms
Release Candidate Programs Tester

Nice work JAMFs!

dgreening
Valued Contributor II

SWEET!

tomt
Valued Contributor

c730e0ec4e794855890bd610ed96eeb5

emily
Valued Contributor III
Valued Contributor III

3771c28097f64127a6928e5320e379f9

cshepp11
New Contributor III

105154a6ceee4ec1b4897a33b1ba118e

chriscollins
Valued Contributor

AWESOME!

wdpickle
Contributor

For just a few seconds when I see a really great resource I almost panic. I think my job could be done by another, then I remember there are only two of that work here that know that grep(s) are not used to make wine!

Alright JAMF!

emily
Valued Contributor III
Valued Contributor III

I imagine someone a little more python-savvy than myself can turn that AD password age script into an AD password days-until-expiration script?

ETA: Okay I guess it is days until expiration. Words.

bentoms
Release Candidate Programs Tester

gachowski
Valued Contributor II

Thank you Thank you !!!!

C

Poseiden951
Contributor

Thanks JAMF!

emily
Valued Contributor III
Valued Contributor III

@bentoms oh we definitely use ADPassMon in our environment. I was just wanting something I could see in an EA in the JSS.

andrewh
New Contributor II

Thanks for sharing!

jhbush
Valued Contributor II

jescala
Contributor II

Love it! Thanks for sharing!

I tried the JSS-LDAP-Sync tool but unfortunately our LDAP queries are hitting the Active Directory LDAP size limit so the script is throwing this exception:

ldap.SIZELIMIT_EXCEEDED: {'desc': 'Size limit exceeded'}

I did a bit of research and it looks like a fix is possible using SimplePagedResultsControl from the python-ldap package. Here is an example of it in use:

https://code.google.com/p/google-apps-for-your-domain-ldap-sync/source/browse/trunk/ldap_ctxt.py

BrysonTyrrell
Contributor II

Hi @jescala,

Our AD environment has less than 500 staff accounts so paging wasn't something I had to worry about when I first wrote this. If you have suggestions for improvements on any of the scripts you could open up a GitHub issue on it. Go here to open one for JSS-LDAP-Sync.

Out of curiosity, how many accounts do you have in the base dn you're searching against?

anfalas
New Contributor II

Awesome, thank you!

jescala
Contributor II

Hello @brysontyrrell,

We have >35,000 users, so we hit that 1000 limit pretty quickly!

I just opened your first issue on GitHub. Thanks so much for doing this! JAMF Rocks! :-)

johnnasset
Contributor

32fe1717d76f4d08a002c02142a25a19

Not applicable

Great to see an effort like this from JAMF, supporting the community! Nicely done.

BrysonTyrrell
Contributor II

Hi everybody,

We've posted another six scripts to the GitHub account. This will probably be the last big update we do for a while. The scripts we've posted are:

Box-Sync-4-Installer
A script for installing Box Sync 4 from Self Service

BYOD-Reporting
A script used to generate a report on devices used for BYOD

Encrypted-Script-Parameters
Functions for generating strings and decrypting them for use as script parameters

Self-Service-Enrollment-Profile
A script to create an enrollment profile for a user from Self Service

Self-Service-QuickAdd-Package
A script to create a QuickAdd package for a user from Self Service

SourceTree-Installer
A script for installing SourceTree from Self Service

If there are improvements that you would like to recommend, please open an issue on the repo for us to work against. No guarantees on when we will be able to address some of these issues (still got to work). We're also following this thread so we will be replying to posts.

And thanks to @jescala for that first issue! Hopefully I'll get some time to work on building in paging support.

nigelg
Contributor

Brilliant. Thanks for sharing JAMF!

Aaron
Contributor II

@emilykausalik I knocked up a script a while ago, which I use to help with password changes, and contains a days-until-expiry component. It shouldn't be too hard to Pythonise if you just want to wrap the commands in a Python subprocess, that way you don't need to worry about 3rd party modules?

BrysonTyrrell
Contributor II

We had an internal request for another script so it got posted today: Reset MDM

Felipe_hernande
New Contributor III

0068ab6bc8a241c68bbd3b5bac6cbe13

Chris_Hafner
Valued Contributor II

Seriously cool! Way to go JAMF!

emily
Valued Contributor III
Valued Contributor III

Silly question time… @brysontyrrell how does one find the mdm uuid?

BrysonTyrrell
Contributor II

@emilykausalik Crap, I didn't put that in the README did I?

Super simple. From a Mac that is managed already, run:

~$ sudo profiles -Pv
profiles: verbose mode ON
_computerlevel[1] attribute: name: MDM Profile
_computerlevel[1] attribute: configurationDescription: MDM Profile for mobile device management
_computerlevel[1] attribute: installationDate: 2015-03-27 00:31:46 +0000
_computerlevel[1] attribute: organization: JAMF Software
_computerlevel[1] attribute: profileIdentifier: <<<UUID-IS-FOUND-HERE>>>
_computerlevel[1] attribute: profileUUID: <<<UUID-IS-FOUND-HERE>>>

Just look for the one with the attribute name of "MDM Profile" - which should be the very first. The profileIdentifier and profileUUID values should be the same.

emily
Valued Contributor III
Valued Contributor III

Thank you, kind sir.

6b09879d3d93427f988276728e825d8b

BrysonTyrrell
Contributor II

Hi everyone!

We made some fairly big additions to our GitHub today. We have two scripts and one project for you to check out:

icns Creator
This is a shell script that takes a source image and outputs an .icns file containing all of the required resolutions (from 16x16 through 512x512@2x).
https://github.com/jamfit/icns-Creator

BugHerder
This Python script takes an XML output from BugHerd and generates JIRA issues. This was used to switch one of our departments to JIRA during our org's migration.
https://github.com/jamfit/BugHerder

HipStatus
This is an OS X status bar app written in Python that manages a user's presence in HipChat based upon their Office 365 calendar availability. For more details check out the README on the repo!
https://github.com/jamfit/HipStatus