If you want to create .mobileconfig profile from a certificate (for example, to import into Munki), you can use Apple Configurator 2 to do so.
If you have your certificate already in your keychain, launch up Keychain Access.app and find the certificate you want to make into a .mobileconfig profile.
Sample Mobileconfig Profiles For Macos Download
Right-click the certificate and select Export NAMEOFTHECERTIFICATE (export it as a .cer).
To see what profiles are installed, and then remove one, assuming you can sudo to the user, you could try: root$ sudo -u chymb profiles -L chymb1 attribute: profileIdentifier: com.stackexchange.apple.test There are 1 user configuration profiles installed for 'chymb' root$ sudo -u chymb profiles -R -p com.stackexchange.apple.test.
Then launch up Apple Configuration 2.app.
Select File and then New Profile
Sample Mobileconfig Profiles For Macos Version
Sample Mobileconfig Profiles For Macos Download
Select Certificates and then Configure.
Find and select the certificate you exported earlier.
Select File and then Save.
Sample Mobileconfig Profiles For Macos Windows 7
Pick a filename for your .mobileconfig, which you can deploy however you want (as I previously mentioned, you can import this into a Munki repo).