Can't upload custom configuration file

kjubus
New Contributor II

Hi!

We're just starting with Jamf and we wanted to set a company webpage as a homepage in Safari. I read a little about it, found code for custom profile and wanted to have a go.

The code I found is this (replaced the site name with facebook):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>HomePage</key>
    <string>https://www.facebook.com</string>
    <key>NewWindowBehavior</key>
    <integer>0</integer>
</dict>
</plist>

When I try to upload it, I get a message "Unable to create object from file". Weird thing is, last week I tried to make a configuration file to enable TeamViewer (the same extension and stuff) and it works perfectly, each time I'd try to do it.

What may be wrong with the file?

10 REPLIES 10

gachowski
Valued Contributor II

When I get the "Unable to create object from file" error.. it's usually because a profile already in Jamf has the same name or same uuid.

C

sshort
Valued Contributor

I would try creating a Safari profile using ProfileCreator, and then uploading a custom mobileconfig vs pasting in the plist data under the custom profile payload in Jamf.

61bd43830a6a4e2abf21487b91e7c601

kjubus
New Contributor II

@gachowski How exactly should I cope with this? I've change the name, what about uuid?

jrblake2
New Contributor II

@kjubus Be sure both the UUID and name are different from any other profiles in the jss. We had a conflict recently and tracked it down to a duplicate profile name, even though the uuid was different. I’d always assumed that jamf only used the uuid, but no. Once i changed both items, it uploaded successfully.

gachowski
Valued Contributor II

Usually when I edit the profile in Xcode the uuid is there and I just change the last number...but I am starting to think you might not have a uuid...

Did you try with the ProfileCreator? That is what most everyone uses...

C

mlizbeth
Contributor II

Silly question, but did you use defaults to write the plist or did you type it manually and save as a plist?

Can you try the following with any success?

Note: com.domain.plist should be replaced with com.apple.Safari.plist (if Safari are the preferences you are trying to manage)

#!/bin/bash
/usr/bin/defaults write ~/Desktop/com.domain.plist HomePage -string https://www.facebook.com
/usr/bin/defaults write ~/Desktop/com.domain.plist NewWindowBehavior -bool FALSE
/usr/bin/plutil -convert xml1 ~/Desktop/com.domain.plist

AVmcclint
Honored Contributor

I was editing an existing mobileconfig file with ProfileCreator and tried to upload that to replace the older revision of it when I got that error. I was able to resolve my issue by running uuidgen and replacing the existing UUID with the one that was generated. it uploaded just fine after that.

jakeobie
New Contributor II
I was editing an existing mobileconfig file with ProfileCreator and tried to upload that to replace the older revision of it when I got that error. I was able to resolve my issue by running uuidgen and replacing the existing UUID with the one that was generated. it uploaded just fine after that.

@AVmcclint Did you change the UUID using ProfileCreator? I don't see a way to do it in the application.

AVmcclint
Honored Contributor

I just ran the uuidgen command in Terminal. It’s been so long since I did it, I don’t know what the actual process is, but I think it just generates a new UUID and you copy/paste that into JSS.

Just used uuidgen on a crowdstrike config profile that 2 different uuid's in it, and was apparently preventing upload.  Worked great.