Skip to main content
Question

LPadmin and Appstore group membership? Was using login hooks...

  • April 4, 2012
  • 5 replies
  • 3 views

Forum|alt.badge.img+6

Hey all,

I'm wondering if there's a preferred method to ensure that all new users get added to the LPadmin and Appstore Groups? When I was using InstaDMG I was using login hooks, but if there's a more appropriate way to do it, I'd really like to migrate to the more JAMF-y way of things.

Any advice out there?

5 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • April 4, 2012

A short script using 'dseditgroup' in a Once per user Login policy should work. I assume that's what you've been doing until now since you mentioned using Login Hooks.


Forum|alt.badge.img+11
  • Valued Contributor
  • April 4, 2012

I use a login hook and add the user to the correct group e.g.:

OS=/usr/bin/defaults read /System/Library/CoreServices/SystemVersion ProductVersion | awk '{print substr($1,1,4)}'

# Give user permission to add the printer manually.
if [ $OS -ge 10.4 ]
then dscl . -append /Groups/_lpadmin GroupMembership $3
fi


Forum|alt.badge.img+6
  • Author
  • Contributor
  • April 5, 2012

I haven't worked with Login policies at all - do they support the $1=current user variable?


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • April 5, 2012

Yes, but Casper scripts use $3 for current logged in user. The process under the hood in Casper is essentially the same as if you use a loginhook to run a script. In fact, I believe its just using the jamf created loginhook to kick off the policy if I'm not mistaken.
Which reminds me, to use Login policies you need to have the Login and logout Hooks stuff enabled under "Settings > Computer Management Framework Settings", particularly the first 2 options under the main checkbox.


Forum|alt.badge.img+3
  • New Contributor
  • October 10, 2012

Does anyone have what to put for the actual scripts or where to add this in JSS? I'm working in 8.6.2. If there's an easier way to do this please let me know, I'm just getting started with the software. Thanks