Hello all.
Looking for a bit of guidance on implementing a dynamic script. I would like to add the username defined in the JAMF/Casper inventory to the administrator group of the machine. The command is simple…
dscl . -append /Groups/admin GroupMembership "$4"
But I want to find a way to automate this a bit better. What I would like is a way to define the $4 variable to look at the Username field for that computer in the database, rather than something that I have to define for each person (as that would be impossible). We are using Casper 8.22. There has to be a way to reference that information in a script, I just can't find an answer online or in the docs.
Has someone else made the username an administrator this way? Or know of a better way? I have a smart group looking for computers that have a value in the username field, and would like to just run this script as a once per computer for that group.
Help? Suggestions? Criticism?
Thanks.
Chris
--
Chris Tangora
Senior Technology Specialist
Middlebury College
ctangora at middlebury.edu
