Results 1 to 3 of 3

Thread: creating script to manage zmprov commands from remote server using ssh.

  1. #1
    sevilla is offline Senior Member
    Join Date
    Dec 2008
    Posts
    68
    Rep Power
    6

    Default creating script to manage zmprov commands from remote server using ssh.

    im developing a little bash script to group all the importants command
    to create, delete, change quota and disabling accounts from a external web interface using php_ssh2 to connect to my zimbra server.

    I want know if the zmprov command drop sucess or error codes number if
    the comand run sucessfully or not.

  2. #2
    dalmate is offline Elite Member
    Join Date
    Jan 2009
    Posts
    369
    Rep Power
    6

    Default

    Yes, it drop code number, you can check by use "system" command of perl language:
    $numberCode = system("zmprov ga abc@domain.com");
    print $numberCode
    hope this help
    when U success, can u upload your code here?

  3. #3
    sevilla is offline Senior Member
    Join Date
    Dec 2008
    Posts
    68
    Rep Power
    6

    Default

    Thanks.. sure, i can upload the code little more later. I not really a programmer, so my code its so basic.
    My works is around this:
    I have a webserver with apache+ssl+php and a php system did it by the programer senior. This program create and delete accounts from email server using cyrus system and sasldb berkeley DB. It also update a ldap server and a main alias map. So, im going to migrate that system with around 14000 mailboxes to zimbra. The office want keep the php manager program but they want update it removing the cyrus mailboxes module and create the new system for zimbra. So. I compiled php with SSH support to connect from the webserver to zimbra system using public/private keys and executing remote commands sending args to my bash script on my zimbra server. So.
    If the new program call ssh "user@zimbra ./bashcript create user@domain.com password" my script will create the account, on zimbra and set the proppers options for all created users. Again, if the php system want erase any user, check their quota, account status and enable or disable it, all is did it by my bash script and not directly using the zmprov commands.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. zimbra opesource Backup Script Problem!
    By tashi in forum Administrators
    Replies: 4
    Last Post: 03-30-2009, 11:49 PM
  2. Creating a Test Server
    By knabe in forum Administrators
    Replies: 1
    Last Post: 02-05-2009, 03:15 PM
  3. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  4. How do I install zmprov on a remote server?
    By jsnapp in forum Administrators
    Replies: 8
    Last Post: 05-08-2008, 03:53 PM
  5. remote IMAP server - courier-imap
    By gregw in forum Installation
    Replies: 2
    Last Post: 04-12-2006, 10:52 AM

Posting Permissions

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