Input settings into .plist for Mac

(imported topic written by Boon91)

Hi

Can I know how can I input information into Mac plist?

Thank you.

(imported comment written by jessewk)

Usually you use the ‘defaults’ command with a ‘write’ argument. Once you have it working on the command line on a host, you can adapt the command to run via BigFix like this:

wait defaults write /Library/Preferences/com.apple.sharing.firewall state -bool true

The above is an example that will turn the firewall on under 10.3 by writing to the com.apple.sharing.firewall plist.

Jesse

(imported comment written by Boon91)

I like to put in the name of current user into one of the plist.

However, I tried to do the following but it don’t seem to be able to create a new key with value -

wait defaults write /Library/Application Support/BigFix_Mac –dict–add LastLoggedInUser (name of current user)

I tried another method -

setting “LastLoggedInUser” = “{name of current user}” on “{now}” for client

but I don’t really know which plist it wrote into. I tried looking at it in com.bigfix.BESAgent.plist but can’t find.

Any idea?