- Open the Terminal Application
- Type in
sudo -i
and type in your Mac Administrator account password.sudo
gives you root level or administrator level privileges.
dsconfigad -show
sudo -i
and type in your Mac Administrator account password. sudo
gives you root level or administrator level privileges.dsconfigad -show
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadIdentifier</key> | |
<string>edu.sju.dock_labs_generic</string> | |
<key>PayloadRemovalDisallowed</key> | |
<true /> | |
<key>PayloadScope</key> | |
<string>User</string> |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.my.logoutwatcher</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/myorg/logoutwatcher.sh</string> | |
</array> |
onLogout() { | |
# Insert whatever script you need to run at logout | |
exit | |
} | |
echo "INFO - Watching ${HOME}" >> /var/log/org.my.log | |
trap 'onLogout' SIGINT SIGHUP SIGTERM | |
while true; do |
#!/usr/bin/python | |
# encoding: utf-8 | |
# | |
# Copyright 2009-2016 Greg Neagle. | |
# | |
# Licensed under the Apache License, Version 2.0 (the 'License'); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
#!/bin/bash | |
<<ABOUT_THIS_SCRIPT | |
------------------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/2cf20236e665fcd7ec41311d50c89c0e |