So with the above, your script should look something like: Packaging
#Mac os list groups how to#
To resolve both, we’ll create a postflight script that will run as part of the install process after the application & launchagent have been installedĭetails on how to resolve the admin authentication prompt is given here, & details on how to make sure a kerberos ticket is granted & 1st login is here.
#Mac os list groups mac#
You should be able to test this now, by logging out then in on a mac that has the app & this LaunchAgent, but you may run into an issue or 2. Replace APPLICATIONNAME with the name of your AppleScript application & save as in /Library/LaunchAgents/ with 755 permissions. To create the LaunchAgent, copy the below. LaunchAgentĪll the above will only work when run as the user you wish to mount the drives & printers as, for this I created a LaunchAgent.Īs this will allow the app to run at every login & as the user logging in.
![mac os list groups mac os list groups](https://mspoweruser.com/wp-content/uploads/2017/11/Microsoft-Remote-Desktop-app-1200x747.jpg)
Below is all the pre from above cobbled together with some comment lines too. Once you’ve added all the drives & printers you wish to map, save the AppleScript as an Application. PRINTERLOCATION : Location/Description field as shown in GUI.For example: /Library/Printers/PPDs/Contents/Resources/HP\\ DesignJet\\ 500ps\\ plus\\ NOTE: as we’re calling a shell script from within Applescript each \ becomes \\. PPDLOCATION : Local path to printer PPD.If using a printserver this would be in the format lpd://PRINTERSERVER.FQDN/PRINTQUEUE. PRINTERNAME : Name you wish the printer to be in the GUI.The error section will create a queue with a generic PPD incase the correct one cannot be found Change the below values for your environment & repeat this pre for each printer you wish to map. So we need to grab a list of all installed printers & pass to a variable.
![mac os list groups mac os list groups](https://www.maketecheasier.com/assets/uploads/2020/06/macos-login-screen-options.png)
Now if we just go a head & install printers that already exist, you’ll get an error.
![mac os list groups mac os list groups](https://i0.wp.com/krypted.com//wp-content/uploads/2017/09/Screen-Shot-2017-09-11-at-8.29.21-AM.png)
![mac os list groups mac os list groups](https://images.macrumors.com/article-new/2020/05/how-to-group-lists-in-reminders-macos-2.jpg)
The following will give you a list of all the users AD Group Memberships, this is also a live query/lookup which means that if a user is connected externally over VPN they can also run this app to map their drives & printers: This is what you see under your search paths in Directory Utility. Next we need to get what dscl calls the nodename. 1st thing, we need to get the users name: