Time set wrong - "This setting has been configured by a profile"

ukmercenary
New Contributor III

 We have a user who's time zone is set wrong..if we try to change it we can't as it is greyed out.

"This setting has been configured by a profile"

I assume this is a JAMF Profile?

1 ACCEPTED SOLUTION

AJPinto
Honored Contributor II

Time and date can be set by a configuration profile (the profile actually sets the default time server). The default time zone cannot be set by a configuration profile as far as I am aware. It's likely grayed out as your user does not have admin access.

You can set the timezone with a script from Jamf.

#!/bin/sh

####
# Script Name: Set Time Zone 
# Author: 
# Date: 5/27/21
# Purpos: Set time zone for Macs
# Notes: 
####


#--------------------------------------------------------
# Set the Mac timezone & timeservers
#--------------------------------------------------------

# Set the timezone
## Run the command at the last line of the script to get a list of options for time zones
## Add the desired time zone in the Jamf Policy under Parameter 4.
systemsetup -settimezone "$4"

# Set the timezone to regions internal time server
# Currently set with a Configuration Profile.
# /usr/sbin/systemsetup -setnetworktimeserver 8.8.8.8

# The below command will list all available timezones
# systemsetup -listtimezones

You can try to grant your users access to change the Time Zone, something like this should do it.

#!/bin/sh

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

 

View solution in original post

2 REPLIES 2

AJPinto
Honored Contributor II

Time and date can be set by a configuration profile (the profile actually sets the default time server). The default time zone cannot be set by a configuration profile as far as I am aware. It's likely grayed out as your user does not have admin access.

You can set the timezone with a script from Jamf.

#!/bin/sh

####
# Script Name: Set Time Zone 
# Author: 
# Date: 5/27/21
# Purpos: Set time zone for Macs
# Notes: 
####


#--------------------------------------------------------
# Set the Mac timezone & timeservers
#--------------------------------------------------------

# Set the timezone
## Run the command at the last line of the script to get a list of options for time zones
## Add the desired time zone in the Jamf Policy under Parameter 4.
systemsetup -settimezone "$4"

# Set the timezone to regions internal time server
# Currently set with a Configuration Profile.
# /usr/sbin/systemsetup -setnetworktimeserver 8.8.8.8

# The below command will list all available timezones
# systemsetup -listtimezones

You can try to grant your users access to change the Time Zone, something like this should do it.

#!/bin/sh

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

 

ukmercenary
New Contributor III

To confirm are you saying I can try to run the below at the terminal screen ?

#!/bin/sh

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