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 03-24-2009, 03:11 AM
Elite Member
 
Posts: 440
Default contact details

Hi,

Just want to continue below link :

number of accounts and domain

it was solved so didnt disturbed that link.

our new client want report as below :

Employee ID Email ID Assigned Quota Used Quota account status
Here employee id field is not there in contact information.
SO i was think is it ok to use phone number field as employee id and get the report ..if it is ok then how to insert this details in exsiting account ?
any clue / command / script ?
Accounts are 1400+ so please help.

Thanks
Reply With Quote
  #2 (permalink)  
Old 03-24-2009, 03:15 AM
Moderator
 
Posts: 7,928
Default

Why not use the Notes field instead ? You could use something like EMPID:99999 and then you can use EMPID as a search parameter.
__________________
Reply With Quote
  #3 (permalink)  
Old 03-24-2009, 05:34 AM
Elite Member
 
Posts: 440
Default

Hi Uxbod,

Thanks for reply.

Yes we can use that field also . actually can use any field. BUt the problem is I have created 1510 accounts by using below script :

*
for i in `cat /usr/input`

do


echo -e $i

/opt/zimbra/bin/zmprov ca $i Password@12 displayName $i zimbraMailQuota 104857600 zimbraContactMaxNumEntries 500 zimbraPasswordMinLength 8 zimbraPasswordMaxLength 64 zimbraPasswordMinUpperCaseChars 1 zimbraPasswordMinLowerCaseChars 1 zimbraPasswordMinNumericChars 1 zimbraPasswordEnforceHistory 5


done


************************************************** ***

But by this script I only can get email ID and quota details. So i wanted to know how to insert "notes" filed with employee id details in EXISTING accounts ? is there any command for it..becasue its not feasible to manually update it for 1510 accounts.
Please help.

Thanks.
Reply With Quote
  #4 (permalink)  
Old 03-27-2009, 02:38 AM
Elite Member
 
Posts: 440
Default

Hi,
Two more and urgent requirement..

1. we need report with last login details...like below :

Email ID Assigned Quota Used Quota account status Last login time


we are getting these details in admin console but how to get it in report ??

2. Our client want that their first name should be their password.
how can I set it for bulk account ? any clue ? the script which i am using for bulk account i have mentioned in above post.....

please help.
Reply With Quote
  #5 (permalink)  
Old 03-27-2009, 02:45 AM
Moderator
 
Posts: 7,928
Default

Quote:
Originally Posted by chandu View Post
1. we need report with last login details...like below :

Email ID Assigned Quota Used Quota account status Last login time

we are getting these details in admin console but how to get it in report ??
Code:
zmprov ga {user@domain} zimbraLastLogonTimestamp
And the next question will be why is the timestamp so out of date. So have a read of :- [SOLVED] Last Login Time in Admin Console

Quote:
Originally Posted by chandu View Post
2. Our client want that their first name should be their password.
how can I set it for bulk account ? any clue ? the script which i am using for bulk account i have mentioned in above post.....
Not sure what you are asking
__________________
Reply With Quote
  #6 (permalink)  
Old 03-27-2009, 03:09 AM
Elite Member
 
Posts: 440
Default

hi uxbod,

thanks for your reply.

for e.g email address is karen.smith@example.com then they want to set their first name as their password i.e. karen

And my pain is accounts are 1400+ ...as per above script i can't set any password policy due to this requirement.
if i use above script and add to change the password in next login then user has o use web interface to change it...as through MS office they wont able to change the password...so it will be unmanageable...

and my plan was set global password for all and once email solution get stable then user can raise the ticket with our helpdesk to change the password...

but just now i got this request...any suggesstion to fix this ???

thanks

Last edited by chandu; 03-27-2009 at 03:12 AM..
Reply With Quote
  #7 (permalink)  
Old 03-27-2009, 03:16 AM
Elite Member
 
Posts: 440
Default

in above script ..in input file ..i am only putting email addresses
Reply With Quote
  #8 (permalink)  
Old 03-27-2009, 03:29 AM
Moderator
 
Posts: 7,928
Default

Do the accounts follow the same format eg. firstname.lastname@example.com ? If so then why not do the following
Code:
for i in `cat /usr/input`
do
  echo -e $i
  PASS=`echo $i | cut -f1 -d.`
  /opt/zimbra/bin/zmprov ca $i $PASS displayName $i zimbraMailQuota 104857600 zimbraContactMaxNumEntries 500 zimbraPasswordMinLength 8 zimbraPasswordMaxLength 64 zimbraPasswordMinUpperCaseChars 1 zimbraPasswordMinLowerCaseChars 1 zimbraPasswordMinNumericChars 1 zimbraPasswordEnforceHistory 5
done
__________________
Reply With Quote
  #9 (permalink)  
Old 03-27-2009, 04:17 AM
Elite Member
 
Posts: 440
Default

Thanks for quick response...

ya we can use this script...

one more thing output of zimbraLastLogonTimestamp is coming in below format :

zimbraLastLogonTimestamp: 20090128181648Z

I couldnt understand this format. can you pls explain..or how to get the output in hh:mm:ss dd:mm:yy

thanks
Reply With Quote
  #10 (permalink)  
Old 03-27-2009, 04:51 AM
Moderator
 
Posts: 7,928
Default

Code:
zmprov ga {user@domain.com} zimbraLastLogonTimestamp | egrep -v "(^#.*|^\s*$)" | sed -e "s/.*: \([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\(.*\)/\3\/\2\/\1 \4:\5:\6/"
Have you tried the ZCS command zmaccts ? This is a perl script so you could take that, create your own version, and add into the additional information you need to extract.
__________________

Last edited by uxbod; 03-27-2009 at 04:58 AM..
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.