give permission to standard users to access date and time option macOS Ventura

Muzaffar
New Contributor II

Hi Guys,

We was using the below to give access date & time for standard user but after macOS ventura upgrade this command is not working 

/usr/bin/security authorizationdb write system.preferences.datetime allow

 

If anyone having any other script please pass on to me 

 

Thanks !!

 

19 REPLIES 19

diegoFA
New Contributor II

Seems to be working on my machine running Ventura?

Try without the full path (leave out /usr/bin/): security authorizationdb write system.preferences.datetime allow

Muzaffar
New Contributor II

can you share the script which you are using on Ventura

Muzaffar
New Contributor II

Can you share the working script ?

techgeek
New Contributor III

@Muzaffar Did you ever get a solution working for this? I'm having the same issue as well.

scuser24
New Contributor III

@Muzaffar @techgeek were any of you able to get this working? I'm having the same issue on all my devices on Ventura.

Muzaffar
New Contributor II

Yes i got the solution try this method..

 

# 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

scuser24
New Contributor III

Nvm I was able to get it working with the same script. I had to flush my policy logs and run sudo jamf policy to pull new policies. Thanks!

scuser24
New Contributor III

I tried that but it still prompts for admin creds. I read that it will still ask for the user password when they want to change the date and time but the user doesn't have to be an admin but that didn't work for me either after entering my standard user creds.

tkimpton
Valued Contributor II

Doesn't work for me on Ventura, still prompts for admin

scuser24
New Contributor III

@tkimpton this is the script I use and it works on Ventura. It will still prompt you to enter credentials but you can enter the user or standard user credentials and it will work. It doesn't have to be a admin credentials.

#!/bin/bash

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

/usr/bin/security authorizationdb write system.preferences allow
/usr/bin/security authorizationdb write system.preferences.datetime allow
/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;

josefrometa
New Contributor II

The script worked great for the Date/Time. How can we implement this for Network/Wi-Fi settings and for Print/Copy settings?

scuser24
New Contributor III

@josefrometa I had to update the script to work with macOS 14.0. Try using this script. It works for me.

#!/bin/bash

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

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

exit 0;

This worked when nothing else did!  Thank you!

Thank you for this, but is there a reason lines 6 and 9 are identical?

scuser24
New Contributor III

No. Looks like a duplicate and you can remove one of the lines.

josefrometa
New Contributor II

The script works great for the date/time preference/settings. I want to do the same with the network/wifi settings and print/scan settings. These were my previous code that doesn't work anymore:

#Unlock Network preference pane
security authorizationdb write system.preferences.network allow
security authorizationdb write system.services.systemconfiguration.network allow

#Unlock Print & Scan preference pane
security authorizationdb write system.preferences.printing allow


Thanks

scuser24
New Contributor III

@josefrometa ah read your post wrong. Try these script for Network and Printer management.

#!/bin/bash

# Workaround as shown in https://www.jamf.com/jamf-nation/discussions/19050/add-wifi-networks-without-admin-privileges
# Allows non-admin users to manage their Network configuration.

#For WiFi

/usr/bin/security authorizationdb write system.preferences.network allow
/usr/bin/security authorizationdb write system.services.systemconfiguration.network allow
/usr/bin/security authorizationdb write com.apple.wifi allow
/usr/bin/security authorizationdb write system.settings.network allow

exit 0;
#!/bin/bash

# Allows non-admin users to manage their Printer configuration.

#For printing

/usr/bin/security authorizationdb write system.preferences.printing allow
/usr/bin/security authorizationdb write system.print.operator allow
/usr/sbin/dseditgroup -o edit -n /Local/Default -a everyone -t group lpadmin
/usr/sbin/dseditgroup -o edit -n /Local/Default -a everyone -t group _lpadmin
/usr/bin/security authorizationdb write system.settings.printing allow

exit 0;

WOW! Thank you so much! That did it :) I'm sure it will be useful for many others. Have an amazing day.

anees
New Contributor

I had to update the script to work with macOS 14.1. Try using this script. It worked for me to allow standard user to change date and time.

#!/bin/bash

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

/usr/bin/security authorizationdb write system.preferences.datetime allow

exit 0;