[Casper] Bash Scripts using ~
Ryan Harter
rharter at uwsp.edu
Tue Apr 21 10:22:39 PDT 2009
Are you using default home directories? We are using ADmit Mac here
so our User directories are in /Domain/UWSP.EDU/Users/. I would say
you should also try hard coding the script, so maybe something like
this:
#!/bin/bash
mkdir /Users/testUser/Desktop/hardcodeTest
mkdir /Users/$3/Desktop/variableTest
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu
On Apr 21, 2009, at 12:04 PM, dhowell at austinisd.org wrote:
>
> SO just even trying a simple script like this it doesn't work
>
> #!/bin/bash
>
>
> mkdir ~/Desktop/testfolder
>
>
>
>
> SO I tried what Ryan said and used $3 variable
>
> mkdir /Users/$3/Desktop/testfolder
>
> still couldn't get it to work???????
>
> I am putting it in Self Service so I can test it. What I am doing is
> trying to kill logged in users MCX settings and refresh. the script
> works if ran by terminal.
>
>
>
> D. Trey Howell
> trey.howell at austinisd.org
> Desktop Engineering
>
>
> Secret Windows code: while (1) { if (num_process > 1)
> { bluescreen(rand()); } }
>
> This email message, including all attachments, is for the sole use
> of the intended recipient(s) and may contain confidential student
> and/or employee information. Unauthorized use of disclosure is
> prohibited under the federal Family Education Rights & Privacy Act
> (20 U.S.C. §1232g, 34 CFR Part 99, 19 TAC 247.2, Gov’, t Code
> 552.023, Educ. Code 21.355, 29 CFR 1630.14(b)(c)). If you are not
> the intended recipient, you may not use, disclose, copy or
> disseminate this information. Please call the sender immediately or
> reply by email and destroy all copies of the original message,
> including attachments.
>
>
>
> "Dorey, Dustin" <Dustin.Dorey at district196.org>
>
> 04/21/2009 10:50 AM
>
> To
> <dhowell at austinisd.org>, <casper at list.jamfsoftware.com>
> cc
> Subject
> RE: [Casper] Bash Scripts using ~
>
>
>
>
>
> Can you give examples of what you’re trying to do?
>
> Are you running them from policy? They are then executing as root
> not the current user I believe.
>
> I’m working on some of the same stuff as well currently.
>
> -Dusty-
>
>
> Dustin Dorey
> Technology Support Cluster Specialist
> Independant School District 196
> Rosemount-Apple Valley-Eagan Public Schools
> dustin.dorey at district196.org
> 651|423|7971
>
>
>
> From: casper-bounces at list.jamfsoftware.com [mailto:casper-bounces at list.jamfsoftware.com
> ] On Behalf Of dhowell at austinisd.org
> Sent: Tuesday, April 21, 2009 10:46 AM
> To: casper at list.jamfsoftware.com
> Subject: [Casper] Bash Scripts using ~
>
>
> I can't get any of my login hooks to work in Casper self service. I
> do have other scripts that work
>
> It seems anytime I use the ~ for logged in user it doesn't work.
>
>
> Is this treated differently in Casper. I run it in terminal it works
> fine. I am sure It is me doing something wrong
>
>
> D. Trey Howell
> trey.howell at austinisd.org
> Desktop Engineering
>
> Secret Windows code: while (1) { if (num_process > 1)
> { bluescreen(rand()); } }
>
> This email message, including all attachments, is for the sole use
> of the intended recipient(s) and may contain confidential student
> and/or employee information. Unauthorized use of disclosure is
> prohibited under the federal Family Education Rights & Privacy Act
> (20 U.S.C. §1232g, 34 CFR Part 99, 19 TAC 247.2, Gov’, t Code
> 552.023, Educ. Code 21.355, 29 CFR 1630.14(b)(c)). If you are not
> the intended recipient, you may not use, disclose, copy or
> disseminate this information. Please call the sender immediately or
> reply by email and destroy all copies of the original message,
> including attachments.
> <ATT00001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090421/d6bedc1c/attachment.html
More information about the Casper
mailing list