Jamf Connect - Extension attribute

Contributor II

So Jamf connect 2.0 has changed a bit on the author. Does anyone have any extension attribute made for which login window is used on a client - native login og JCL window.

Know the stuff happens in the auth.db database, but struggling to find a way to create an extension attribute to verify which login mechanism the clients have


Valued Contributor
Valued Contributor

You can build something that reads out

security authorizationdb read system.login.console

The Mechanisms key lists the loginwindow settings as an array of strings. Mechanisms defined as "privileged" prompt the loginwindow to run the mechanism as the root user. The only built-in macOS mechanism removed by Jamf Connect is loginwindow:login, which displays the standard macOS login window.

Contributor II

thanks. And yes the read from this I also have found, but how to get this string loginwindow:login out of it, I just can´t figure out.

If it was a normal plist file I had enough of examples, but this system.console.login I am struggeling with my scripting skills

Legendary Contributor III

@jameson A simple grep against the output should be enough. If all you need to know for the Extension Attribute is whether the loginwindow:login string is present, then just grep for it, and if found, set a variable to Yes or some other simple string and echo back. Or, if not present, echo back No, etc.

For example, something like the following should work I think.


loginwindow_check=$(security authorizationdb read system.login.console | grep 'loginwindow:login' 2>&1 > /dev/null; echo $?)

if [ $loginwindow_check == 0 ]; then
    echo "<result>OS LoginWindow</result>"
    echo "<result>JC LoginWindow</result>"

Contributor II

Thanks a lot. :) - works great - and think I just overcomplicated this, as in the the output saw Array, string instead of just searching for the direct name