Allow Standard Users to change Date and Time on Sequoia

tahir
New Contributor III

Previously, we deployed the following script to allow standard users to change the date and time without requiring admin credentials. However, this is no longer working on Sequoia devices. Can someone assist in enabling this functionality on Sequoia devices?

#!/bin/bash

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

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

exit 0;

 

4 REPLIES 4

dennisnardi
Contributor

If you replace

....system.preferences....

with

....system.settings....

you should get the same effect on Sequoia.

tahir
New Contributor III

I have tried suggested changes but still asking for admin credentials.

#!/bin/bash

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

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

exit 0;

 

tahir
New Contributor III

@dennisnardi  made changes like below but with this still its asking admin credentials


#!/bin/bash

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

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

exit 0;

dennisnardi
Contributor

This is the complete script I use in my environment and it works with Sequoia and earlier systems:

#!/bin/sh

# Unlock System Preferences for non admins.
sudo security authorizationdb write system.preferences allow
sudo security authorizationdb write system.settings allow

# Unlock Date and Time
sudo security authorizationdb write system.preferences.datetime allow
sudo security authorizationdb write system.settings.datetime allow
sudo security authorizationdb write system.preferences.dateandtime.changetimezone allow
        
# Unlock Energy Saver preference pane
sudo security authorizationdb write system.preferences.energysaver allow
sudo security authorizationdb write system.settings.energysaver allow

# Unlock Network preference pane
sudo security authorizationdb write system.preferences.network allow
sudo security authorizationdb write system.settings.network allow
sudo security authorizationdb write system.services.systemconfiguration.network allow
/usr/libexec/airportd prefs RequireAdminNetworkChange=NO RequireAdminIBSS=NO
/usr/bin/security authorizationdb write com.apple.wifi allow
        
# Unlock Print & Scan Preference pane
sudo security authorizationdb write system.preferences.printing allow
sudo security authorizationdb write system.settings.printing allow
        
# Unlock Time Machine preference pane
sudo security authorizationdb write system.preferences.timemachine allow
sudo security authorizationdb write system.settings.timemachine allow

# Give Everyone Print Operator Access
sudo dseditgroup -o edit -n /Local/Default -a everyone -t group lpadmin