Skip to main content
Question

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

  • Dec 16, 2022 9:14 AM UTC
  • 19 replies
  • 596 views

Muzaffar
Forum|alt.badge.img+3

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

Forum|alt.badge.img+1
  • New Contributor
  • Dec 16, 2022 3:15 PM UTC

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
Forum|alt.badge.img+3
  • Author
  • New Contributor
  • Dec 19, 2022 6:50 AM UTC

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


can you share the script which you are using on Ventura


Muzaffar
Forum|alt.badge.img+3
  • Author
  • New Contributor
  • Jan 3, 2023 6:40 AM UTC

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


Can you share the working script ?


Forum|alt.badge.img+5
  • Contributor
  • Feb 13, 2023 5:26 PM UTC

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


Forum|alt.badge.img+4
  • New Contributor
  • Feb 21, 2023 12:47 AM UTC

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


Muzaffar
Forum|alt.badge.img+3
  • Author
  • New Contributor
  • Feb 21, 2023 3:46 AM UTC

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


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


Forum|alt.badge.img+4
  • New Contributor
  • Feb 21, 2023 3:40 PM UTC

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.


Forum|alt.badge.img+4
  • New Contributor
  • Feb 21, 2023 8:55 PM UTC

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


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!


Forum|alt.badge.img+21
  • Honored Contributor
  • May 11, 2023 9:54 AM UTC

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


Forum|alt.badge.img+4
  • New Contributor
  • May 11, 2023 1:57 PM UTC

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


@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;

Forum|alt.badge.img+3
  • New Contributor
  • Jun 13, 2023 4:05 PM UTC

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


Forum|alt.badge.img+4
  • New Contributor
  • Jun 13, 2023 4:09 PM UTC

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


@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;

Forum|alt.badge.img+3
  • New Contributor
  • Jun 13, 2023 4:13 PM UTC

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


Forum|alt.badge.img+4
  • New Contributor
  • Jun 13, 2023 4:17 PM UTC

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


@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;

Forum|alt.badge.img+3
  • New Contributor
  • Jun 13, 2023 4:22 PM UTC

@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.


joelfeld
Forum|alt.badge.img+6
  • New Contributor
  • Jul 25, 2023 2:11 PM UTC

@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!


Forum|alt.badge.img+18
  • Valued Contributor
  • Oct 5, 2023 4:57 PM UTC

@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;

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


Forum|alt.badge.img+4
  • New Contributor
  • Oct 5, 2023 5:04 PM UTC

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


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


anees
Forum|alt.badge.img
  • New Contributor
  • Nov 14, 2023 11:30 AM UTC

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;