There are a few problems one is faced with after copying so many profiles from someone else this way.
- The top-level PayloadIdentifier is not ours
- The PayloadUUIDs are no longer unique
The first problem is easily solved with existing tools.
The second problem…not so much.
sed -i '' 's/org\.sacredsf/org\.glenbrook225/' ./*.mobileconfig
The second problem…not so much.
I wrote a little something to create new UUIDs for the configs.
It works but it needs two things that I can think of.
- the nested PayloadIdentifiers should update. I'm thinking something like Apple does but without the text. Maybe formatted like so: "new-top-UUID.new-payload-UUID"
- sometimes the outer-level moves from the top of the file to the bottom. I don't know if this is because dictionaries in python have no order or some other reason but it makes them less human-readable.