Skip to main content
Solved

deploy a shell script to remove certain home directory


Forum|alt.badge.img+6

Hi All

I was trying to deploy a chrome package to the whole company, but unfortunately we found after the deployment a new home directory was added under /Users on everyone's Mac. how can i remove this home directory?
for exapmle, the home directory is /Users/test

i created a shell like the following

!/bin/sh

rm -rf /Users/test

i tried this shell, can remove /Users/test by inputing sudo ./deleletestdirrectory.sh locally,

but none of them got removed on JSS. this is kind of urgent, could someone help on this ?

thanks so much

Best answer by Simmo

@Dalmatian

View original
Did this topic help you find an answer to your question?

4 replies

bpavlov
Forum|alt.badge.img+18
  • Esteemed Contributor
  • 1206 replies
  • May 18, 2015

Just based off the computer you've given, why not try to create a policy that runs a simple command of "rm -rf /Users/test" ? Set to it once per computer.


Forum|alt.badge.img+6
  • Author
  • Contributor
  • 68 replies
  • May 18, 2015

@bpavlov

how can i simply run command line via JSS? there is no place to fill in a cli rather than a script to choose.

thanks


Forum|alt.badge.img+12
  • Contributor
  • 222 replies
  • Answer
  • May 18, 2015

Forum|alt.badge.img+6
  • Author
  • Contributor
  • 68 replies
  • May 18, 2015

@sibc thanks it works


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings