[Casper] Using $1, $2, $3 etc...
Dorey, Dustin
Dustin.Dorey at district196.org
Tue Mar 10 11:09:12 PDT 2009
That's the ticket, I was trying to write too much into the script, I'll
strip it down and just run once per user on each machine in the policy.
We've got an issue with a library file that has the incorrect
permissions that needs to be fixed on each user on the machine,
including our bound accounts which really is where I hit the wall.
Thanks for the responses Miles and Clinton!
-Dusty-
From: casper-bounces at list.jamfsoftware.com
[mailto:casper-bounces at list.jamfsoftware.com] On Behalf Of Clinton
Blackmore
Sent: Tuesday, March 10, 2009 9:30 AM
To: Dorey, Dustin
Cc: Jamf List Serve
Subject: Re: [Casper] Using $1, $2, $3 etc...
Page 170 of the Casper Suite 6.0 Documentation.pdf talks about scripts
briefly, and refers you to the example scripts. The example scripts
that come with Casper (they would've been in the original installation
DMG) show that $3 is the current user (although it is only populated if
the script is called at login or logoff.)
The 'w' and 'who' commands will give the users who are currently logged
in. I think
who | grep console | cut -d " " -f 1
will probably be the best way to get a list of all users logged in
graphically.
As for getting a list of all users who have accounts on the machine, if
they are all in the Users folder, you could do something like this:
for USER in `ls /Users` ; do echo $USER ; done
If your users aren't all in the Users folder, you probably have to move
on to using dscl, and it'll take a bit more effort.
Lastly, Casper has facilities to "Fill User Templates" (FUT) and "Fill
Existing Users" (FEU), which helps if you need to create or modify a
file for all users. Or, to really make use of the $3 parameter, you
should create a script that runs at login, scheduled to run once for
each user.
I hope this answers your question.
Cheers,
Clinton
On 10-Mar-09, at 8:07 AM, Dorey, Dustin wrote:
Does anyone know if there is documentation anywhere on Using $1, $2, $3
in scripts to cycle through the users etc.... I know this has been
discussed a bit before but in digging around the KB and the resource kit
I can find it in use but would like to review an documentation
available. I've got to make some scripts to deal with some imaging
issues we had previously and being able to cycle through all the
existing users would be of great help.
Thanks folks, I'm sure I'm missing something easy. Still adjusting to
this daylight savings time thing can't get the brain working right this
week.
-Dusty-
Dustin Dorey
Technology Support Cluster Specialist
ISD 196 Apple Valley, Eagan, Rosemount
dustin.dorey at district196.org
952|423|7971
_______________________________________________
Casper mailing list
Casper at list.jamfsoftware.com
http://list.jamfsoftware.com/mailman/listinfo/casper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090310/d8a5873a/attachment.html
More information about the Casper
mailing list