Getting Data In

Change multiple users timezone

oferprtz
Path Finder

Hi all,

How can we change the user timezone for all users under: Settings -> Access Controls -> Users?

thanks,
ofer.

Tags (3)
0 Karma
1 Solution

oferprtz
Path Finder

Found the answer!!
I've created command that add the time zone into all files of all users.
the con is the user directory must be exists (the user need to login at least once before you can apply this).
In each user directory you have the file "user-prefs.conf".
inside it it store all user configuration.
if you add at the end of the file the parameter: "tz = Asia/Jerusalem" for instance, the user will have set Jerusalem timezone.

to add timezone to all the users files use the below:
cd /opt/splunk/etc/users/ or where you have installed splunk.
find . -name "user-prefs.conf" -print | xargs sed -i '$a\tz = Asia/Jerusalem'
(or change the timezone to whatever you want).

enjoy!

View solution in original post

oferprtz
Path Finder

Found the answer!!
I've created command that add the time zone into all files of all users.
the con is the user directory must be exists (the user need to login at least once before you can apply this).
In each user directory you have the file "user-prefs.conf".
inside it it store all user configuration.
if you add at the end of the file the parameter: "tz = Asia/Jerusalem" for instance, the user will have set Jerusalem timezone.

to add timezone to all the users files use the below:
cd /opt/splunk/etc/users/ or where you have installed splunk.
find . -name "user-prefs.conf" -print | xargs sed -i '$a\tz = Asia/Jerusalem'
(or change the timezone to whatever you want).

enjoy!

MuS
SplunkTrust
SplunkTrust

Hi oferprtz,

this is not possible within the UI manager, but you can set user's default time zone in user-prefs.conf if you are using the Splunk internal user management.

hope this helps ...

cheers, MuS

oferprtz
Path Finder

thanks MuS, its exactly what ive found out + ive added command line that change all users.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...