Results 1 to 4 of 4

Thread: Change default theme for all users via command line?

Hybrid View

  1. #1
    Join Date
    Aug 2013
    Posts
    1
    Rep Power
    2

    Default Change default theme for all users via command line?

    Hi! I searched the forums and the wiki, and did not find a correct answer.

    So, I want all users to use the Carbon theme. But most of them changed their default theme. Then, how is the correct command (or sequence of commands) via terminal to reset all users theme to the one I want them to use by default?

    Also, it's possible to hide some side bar options in administration Console (The Default COS for example) so only the main administrator can see?

    Thank you!

  2. #2
    Join Date
    Apr 2009
    Posts
    93
    Rep Power
    6

    Default

    Regardless of why, they're the admin, let them badger their users all they'd like.

    We did this when we went to zimbra 8. We implemented a custom theme to go along with the 8 upgrade. So we moved everyone who was using the old default, over to our custom theme. leaving those who had changed away from the default alone.

    There are two zmprov preferences related to theme. zimbraPrefSkin and zimbraAvailableSkin. If i change both of these to a new theme, it appears to take affect the next time the user refreshes webmail (or loggs out and back in).

    I'd do it like this:
    $ zmprov ma username@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon

    I'm not sure if changing zimbraPrefSkin is necesary, it appears to take affect when i change zimbraAvailableSkin.

    You'll have to do that in some sort of loop, for every user you'd like to change.

    You could get fancy and do something like:

    $ for i in `zmprov gaa`; do zmprov ma ${i}@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon;done;

    that would pipe the output of zmprov gaa (getallaccounts) into a for loop, setting them all back to carbon.

  3. #3
    Join Date
    Jul 2007
    Posts
    343
    Rep Power
    8

    Default

    This feature is very much user specific. If user want to use a particular theme then user is free to do so. Why forcing user to use particular skin/theme?
    ~=Prashant=~

  4. #4
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,374
    Rep Power
    11

    Default

    Quote Originally Posted by NathanL View Post
    Regardless of why, they're the admin, let them badger their users all they'd like.

    We did this when we went to zimbra 8. We implemented a custom theme to go along with the 8 upgrade. So we moved everyone who was using the old default, over to our custom theme. leaving those who had changed away from the default alone.

    There are two zmprov preferences related to theme. zimbraPrefSkin and zimbraAvailableSkin. If i change both of these to a new theme, it appears to take affect the next time the user refreshes webmail (or loggs out and back in).

    I'd do it like this:
    $ zmprov ma username@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon

    I'm not sure if changing zimbraPrefSkin is necesary, it appears to take affect when i change zimbraAvailableSkin.

    You'll have to do that in some sort of loop, for every user you'd like to change.

    You could get fancy and do something like:

    $ for i in `zmprov gaa`; do zmprov ma ${i}@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon;done;

    that would pipe the output of zmprov gaa (getallaccounts) into a for loop, setting them all back to carbon.
    Each time you run zmprov it launches a separate jetty instance, which is expensive, so better to do the following:

    First, if you have 500 users whose theme you want to change, create as the zimbra user a 500-line file where the lines read:

    Code:
    ma user1@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon
    ma user2@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon
    ma user3@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon
    ...
    ma user500@domain.com zimbraAvailableSkin carbon zimbraPrefSkin carbon
    Call this file, say, /tmp/update_theme.zmp

    Then have a single zmprov instance do all the work for you:

    Code:
    zmprov -f /tmp/update_theme.zmp
    You are done.

    Hope that helps,
    Mark

Similar Threads

  1. Replies: 1
    Last Post: 04-08-2013, 09:18 AM
  2. change default theme of login page.
    By stalker in forum Administrators
    Replies: 6
    Last Post: 12-01-2011, 09:24 PM
  3. change default theme of login page.
    By stalker in forum Installation
    Replies: 0
    Last Post: 03-23-2011, 04:11 AM
  4. change default view for new users
    By bdial in forum Administrators
    Replies: 2
    Last Post: 03-14-2009, 08:19 AM
  5. Get/change account information via command line
    By quietas in forum Administrators
    Replies: 2
    Last Post: 01-15-2009, 12:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •