Skip to main content

I am having troubles allowing non admin users to change the Date and Time on their Macbooks. There are quite a few teachers who let their Macbooks battery drain over the holiday break and when they got back in district their date and time were wrong and they could no longer connect to WiFi.



We had previously enable Non Admins to change their date and time settings with the following command:



#Allow Date/Time Change
security authorizationdb write system.preferences.datetime allow


This unlocks the date and time section within system preferences for non admin users but for some reason when users try to change their date and/or time it reverts back once they click save. For example if the year says 2018 instead of 2020 the staff member changes it to 2020 and clicks save, then the year will change itself back to 2018. (Settings that set the time automatically have been turned off at this point.) We can successfully change the time when logged in as a local admin account but our users are not local admins.



If anyone has any insight as to why users are unable to change their date or time it would be greatly appreciated.

I haven't looked at this in quite a while, but this is the script we push out to every Mac we deploy to allow users to make changes to date and time:



# Allows any user to change the date and time on their Mac.

security authorizationdb write system.preferences allow
security authorizationdb write system.preferences.datetime allow

john.sherrod



Thank you that fixed my issue. For some reason I was thinking that first line would allow users to change any setting in system preferences but I guess I was wrong.


@jsquires3 Glad I could help!


Slightly off-topic since I'm experimenting on 10.15.3, but has anyone else noticed that the "authorizationdb" scripts themselves work locally through terminal, but if they're being pushed out as a policy, it errors every time regardless of it being a push or Self Service policy?


In my testing so far this has worked on 10.15.6 computers as well.


Hi John, I wasn't able to change the time after running the above-mentioned scripts from admin mode in the terminal. I was getting the error saying " NO (-60008) "


this one is not working after macOS ventura upgrade can someone help me to get the new working script 


Can anyone update the script for macOS ventura, standard user unable to edit date and time even after running the script


@Muzaffar @rafiq 

/usr/bin/security authorizationdb write system.preferences.dateandtime.changetimezone allow
/usr/bin/security authorizationdb write system.preferences.datetime authenticate-session-owner-or-admin

This worked for me on Ventura

Found it over on the macadmins slack https://macadmins.slack.com/archives/C03K5RQ6H7S/p1670260127359969?thread_ts=1658494328.335939&cid=C03K5RQ6H7S 
 


@Muzaffar @rafiq 

/usr/bin/security authorizationdb write system.preferences.dateandtime.changetimezone allow
/usr/bin/security authorizationdb write system.preferences.datetime authenticate-session-owner-or-admin

This worked for me on Ventura

Found it over on the macadmins slack https://macadmins.slack.com/archives/C03K5RQ6H7S/p1670260127359969?thread_ts=1658494328.335939&cid=C03K5RQ6H7S 
 


Thank you so much this works well on Ventura 🙏


@Muzaffar @rafiq 

/usr/bin/security authorizationdb write system.preferences.dateandtime.changetimezone allow
/usr/bin/security authorizationdb write system.preferences.datetime authenticate-session-owner-or-admin

This worked for me on Ventura

Found it over on the macadmins slack https://macadmins.slack.com/archives/C03K5RQ6H7S/p1670260127359969?thread_ts=1658494328.335939&cid=C03K5RQ6H7S 
 


Thanks @AdamCraig it is working now users has password prompt where they can put their password to update date and time


@Muzaffar @rafiq 

/usr/bin/security authorizationdb write system.preferences.dateandtime.changetimezone allow
/usr/bin/security authorizationdb write system.preferences.datetime authenticate-session-owner-or-admin

This worked for me on Ventura

Found it over on the macadmins slack https://macadmins.slack.com/archives/C03K5RQ6H7S/p1670260127359969?thread_ts=1658494328.335939&cid=C03K5RQ6H7S 
 


This is super helpful, I dont suppose you know how to give our users access to al system preferences without admin rights? 


I just added these commands to a File/Processes field in a policy and it worked like a charm. Very simple and elegant. Thanks!


Reply