If you replace
....system.preferences....
with
....system.settings....
you should get the same effect on Sequoia.
If you replace
....system.preferences....
with
....system.settings....
you should get the same effect on Sequoia.
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;
If you replace
....system.preferences....
with
....system.settings....
you should get the same effect on Sequoia.
@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;
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
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
This worked for me in Sequoia.
#!/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
I just used this snippet for our needs.
This worked for me in Sequoia.
#!/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
I just used this snippet for our needs.
Thanks for your comment. But unfortunately this is not working for me at Sequoia Devices.
Odd. Mine keeps reverting back to requiring admin. It works for a bit then reverts. You do have to close system settings before the change is in effect.
I have the feeling that the settings are reset after a macOS update?
Thought i chime in but have been curious. I have not have not had any luck configuring auth using System Settings. I have seen it work and then not work. If people do have this working are they running this on a schedule or login?
I put this together earlier today to allow users to set their time zone as well as check networktime and time server. Run it from Self Service as a policy.
#!/bin/bash
# Get the list of timezones
timezones=$(systemsetup -listtimezones | tail -n +2 | paste -sd "," -)
# Use it in swiftDialog
selection=$(dialog \
--title "Timezone Selector" \
--message "Choose your preferred timezone." \
--messagealignment "center" \
--selecttitle "Timezones" \
--selectdefault "America/New_York" \
--selectvalues "$timezones" \
--small \
--ontop)
# Extract the actual timezone value from the JSON result
selected_timezone=$(echo "$selection" | awk -F'"' '/SelectedOption/ {print $4}')
# Set the timezone
echo "Setting time zone to $selection."
systemsetup -settimezone "$selected_timezone"
echo "verifying network time is on and network time server is time.apple.com"
/usr/sbin/systemsetup -setusingnetworktime on -setnetworktimeserver time.apple.com