Results 1 to 6 of 6

Thread: List accounts by COS

  1. #1
    Join Date
    Jun 2008
    Posts
    22
    Rep Power
    7

    Default List accounts by COS

    I haven't found anywhere in the admin panel where you can list the accounts by COS. I tried saving a search that would do this but you aren't able to search by COS. Am I missing something? It seems like this should be built in.
    Server: Dell 2850, Dual Xeon Dual Core 3.0ghz CPUs, 16gb Ram, 4 x 750gb 15k Hard drives

  2. #2
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    you probably have to use the command line. there may be a better command to do this but if there is I don't know it so i'll use a few commands. First take a user you know is in the cos and do this

    Code:
    su - zimbra
    zmprov ga <user> | grep zimbraCOSId
    That should ouput the id, then do

    Code:
    zmprov sa zimbraCOSId=<id>

  3. #3
    Join Date
    Jul 2008
    Location
    Michigan, USA
    Posts
    42
    Rep Power
    7

    Default

    Hmm, since I am learning Zimbra, I wanted to try out those commands. However when I run them, if I type the syntax correctly, I get nothing displayed on screen. Is there a logfile that this stuff is being spit out into?

  4. #4
    Join Date
    Jan 2008
    Posts
    658
    Rep Power
    8

    Default

    I tried that and it actually didn't return anything for my account unless I unchecked the box for using the default class of service in the admin UI.

    That sa also only returns users that have that COS id set, but are not set to be automatic according to the domain.

    It *appears* that if that field is not set, then it goes by the default domain COS. You can get the value for that by using:
    Code:
    zmprov gd domain.com | grep COS

  5. #5
    Join Date
    May 2008
    Posts
    432
    Rep Power
    7

    Default

    Isn't there a way to sort it in the Admin panel?

    That would be much easier...

  6. #6
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Sure, first open the COS and copy where it says "ID: string"
    Then type the following in the admin console search bar:
    (zimbraCOSID=string)

    CLI:
    zmprov gc <COSName> | grep zimbraId
    zmprov sa zimbraCOSId=string

    or zmprov sa zimbraCOSId=string > file.txt

    There's also this bug: Bug 29763 - Missing zimbraCOSId when set to auto
    -create domain.com assign it COS1
    -create test@domain.com cos set to auto > doesn't show zimbraCOSId
    -create test2@domain.com cos set to default > doesn't show zimbraCOSID
    -create test3@domain.com cos set to COS1 > shows zimbraCOSId

    When creating accounts you should use:
    zmprov gc <COSName> | grep zimbraId
    zmprov ca name@domain.com <password> zimbraCOSId <zimbraIdNumberStringCOS>

    Vote for these RFE's:
    Bug 14266 - Extend search among users to COS
    Bug 18779 - Sorting User Accounts by COS.
    Bug 3373 - bulk move of users from one COS to another

    Quote Originally Posted by mmorse View Post
    zmprov searchAccounts [-v] {ldap-query} [limit {limit}] [offset {offset}] [sortBy {attr}] [attrs {a1,a2...}] [sortAscending 0|1*] [domain {domain}]

    While:
    Code:
    zmprov sa -v zimbraCOSId=string | grep uid
    Gives:
    uid: username

    And:
    Code:
    zmprov sa zimbraCOSId=string
    Gives:
    username@domain.com

    But for:
    Code:
    zmprov sa zimbraCOSId=string attrs uid
    It still gives you:
    username@domain.com

    And should have given:
    username

    Code:
    zmprov sa -v zimbraCOSId=string attrs uid
    With -v it's a huge list outputted to the console, however -v is supposed to be used there anyways so that it can dump attributes.

    The command was never corrected/closed out as wontfix: Bug 12759 - zmprov searchAccounts does not return requested attrs
    -I suppose if it doesn't work (though it would be useful) we should remove the [attrs {a1,a2...}] from the help
    Last edited by mmorse; 08-13-2008 at 09:20 AM.

Similar Threads

  1. List users by COS
    By dwmtractor in forum Administrators
    Replies: 8
    Last Post: 03-27-2014, 09:06 PM
  2. Retrieving list of Active Accounts
    By Flancer in forum Administrators
    Replies: 4
    Last Post: 12-05-2010, 11:15 PM
  3. Replies: 5
    Last Post: 07-06-2010, 02:44 AM
  4. Exchange/Imap errors
    By pmibal in forum General Questions
    Replies: 4
    Last Post: 09-23-2009, 11:46 AM
  5. HOWTO: Find accounts using a COS
    By peter@mxtoolbox.com in forum Administrators
    Replies: 6
    Last Post: 08-29-2007, 08:27 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
  •