Results 1 to 2 of 2

Thread: [SOLVED] Switch to zimbra user

  1. #1
    dancc is offline Starter Member
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    5

    Default [SOLVED] Switch to zimbra user

    Hello, I am trying to automate my backup using my exisiting backup solution. What I use now is rdiff-backup. I have a script that looks like this

    Code:
    #!/bin/bash
    
    sudo -u zimbra zmcontrol stop >> /root/logs/zmcontrol.log
    rdiff-backup -v5 --print-statistics /opt root@192.168.0.206::/srv/Zimbra >> /root/logs/zimbra.log
    sudo -u zimbra zmcontrol start >> /root/logs/zmcontrol.log
    it doesn't work.

    What I want to happen is the script (excuted as root) will execute zmcontrol stop as the user zimbra then run the backup then start zmcontrol as zimbra

    would just executing the script as zimbra be ok? only /opt is being copied

    thanks for any help

  2. #2
    dancc is offline Starter Member
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    5

    Default

    I got it working, here is what I did if anyone wants to know


    zmcontrol is at /opt/zimbra/bin/zmcontrol

    so in my script instead of
    Code:
    sudo -u zimbra zmcontrol stop
    it is

    Code:
    sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
    Seems to work as it should

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Postfix unavailable - queue down
    By pmona in forum Administrators
    Replies: 20
    Last Post: 01-21-2010, 10:03 PM
  2. [SOLVED] Zimbra logwatch.
    By nishith in forum Administrators
    Replies: 5
    Last Post: 06-10-2009, 04:42 PM
  3. DNS Questions and Trouble Installing
    By smurraysb in forum Installation
    Replies: 22
    Last Post: 03-14-2008, 03:27 PM
  4. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 10:34 PM
  5. Mail logs
    By Rick Baker in forum Installation
    Replies: 8
    Last Post: 01-17-2006, 04:33 PM

Posting Permissions

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