You are not logged in.

Announcement

[2017.09.08] DeployStudio build v1.7.8 (checksum, release note).
[2016.08.26] DeployStudio build v1.6.19 (release note).
[2013.02.23] DeployStudio last universal build v1.5.17 (release note).

#1 2017-09-26 14:29:45

Foggy
Member
Registered: 2009-10-05

Delete all profiles as part of workflow?

So far tried
/usr/bin/profiles -D

but this has an extra bit to the process i.e if executed via terminal it then asks
'do you really want to delete all profiles' so is failing as a generic script aborting the workflow.

Anybody ever done this?

Offline

#2 2017-09-27 00:21:26

Meat
Member
From: SF CA US
Registered: 2009-02-04

Re: Delete all profiles as part of workflow?

A fair number have. You'll need to look for a script that walks through /Users and removes the user account associated with the home folders in /Users.

Typically I've seen a for loop, using rm -r /Users/$i, and dscl to remove the user account. I don't have one handy though...

Offline

#3 2017-09-27 08:32:32

Foggy
Member
Registered: 2009-10-05

Re: Delete all profiles as part of workflow?

I am not using "user" profiles I do all the management at device level so no need to delete the user homes.

This seems to have nuked all profiles
echo y | /usr/bin/profiles -D
but not tried it yet in a workflow. Needs root to run

Offline

#4 2017-09-27 18:38:04

Meat
Member
From: SF CA US
Registered: 2009-02-04

Re: Delete all profiles as part of workflow?

Woops! Sorry. Configuration Profiles. It's all clear to me now.
-f  Automatically confirm any questions?

Offline

#5 2017-09-28 12:38:12

Foggy
Member
Registered: 2009-10-05

Re: Delete all profiles as part of workflow?

/usr/bin/profiles -D -f Even better thanks!

Offline

#6 2017-10-06 09:30:28

Foggy
Member
Registered: 2009-10-05

Re: Delete all profiles as part of workflow?

And then for installing them
/usr/bin/profiles -I -F /path/to/where/you/put/them/TrustProfile.mobileconfig
then
/usr/bin/profiles -I -F /path/to/where/you/put/them/Enroll_the_Mac.mobileconfig

Using this as I cannot get the automatic enrolment working as part of a workflow

Offline

Board footer

Powered by FluxBB