Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-2011, 06:59 AM
Junior Member
 
Posts: 6
Default Problems with ZMPROV command

Hi,

I'm having an strange problem. I use a *.sh file to update the accounts, aliases and distribution lists in my Zimbra installation. I created a little program in my main server to create a .sh file with new accounts, aliases, distribution lists and accounts to be removed. During test phase it has worked perfectly. I've done the movement of the file created manually, copying and pasting the contents of the file in the server where Zimbra is installed and when running it I haven't had a problem. Now, when preparing things to get a step forward, I made some scripts to include the .sh file in a rar file with password, and cron in server with zimbra downloads it, uncompress and execute the file, but now I get a problem, the sh file create accounts but when trying to create an alias or a distribution list I always get an error saying "ERROR: account.NO_SUCH_DOMAIN (no such domain:". I guess it's a problem in the file I create with the program, due to type of file, chars set, I don't know.

If I get the text of the file when downloaded, that text giving problems, and copy/paste it in a sh created in the server it runs fine.

Any help is welcome.

regards
Reply With Quote
  #2 (permalink)  
Old 07-14-2011, 07:09 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default

I'm sorry but what you've posted doesn't make sense to me. If you're having a problem running the zmprov in a script then post the script so it can be reviewed.
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 07-14-2011, 07:57 AM
Junior Member
 
Posts: 6
Default ZMPROV code

Hi,

here the contents of .sh file

zmprov ca john.doe@ghg2810.org 123443212 displayName john.doe
zmprov cdl all@ghg2810.org
zmprov adlm all@ghg2810.org john.doe@ghg2810.org
zmprov aaa john.doe@ghg2810.org fi-aoc@ghg2810.org
zmprov ca gustavo.hernandez@ghg2810.org 8899998899 displayName gustavo.hernandez
zmprov adlm all@ghg2810.org gustavo.hernandez@ghg2810.org

Only lines with create account are correcly executed. The rest give an error. Create Distribution List and add alias give the error I already wrote in previous post. Add account user to a distribution lists gives an error saying the distribution list doesn't exist, what's obvious.

regards.
Reply With Quote
  #4 (permalink)  
Old 07-14-2011, 08:11 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default

Are you actually running these as the Zimbra user in the script? How are you becoming the Zimbra user? In isolation those instructions should work, where's the rest of the script?
__________________
Regards


Bill
Reply With Quote
  #5 (permalink)  
Old 07-14-2011, 08:17 AM
Junior Member
 
Posts: 6
Default Cont

Hi,

yes, it runs as zimbra user cause it's launched by Zimbra cron. The rest of the script is:

first lines:
#!/bin/bash

No more lines. As I got errors, I reduced in the main server the exe program to create only these accounts to test, and with them I get the errors.

regards.
Reply With Quote
  #6 (permalink)  
Old 07-14-2011, 11:10 AM
Junior Member
 
Posts: 6
Default Solution found

Hi,

just found the solution. Using dos2unix it fix the problem with codes Windows insert and linux doesn't need.

regards and thanks for your help.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.