Results 1 to 5 of 5

Thread: Bulk Provisioning

  1. #1
    scalper is offline Partner (VAR/HSP)
    Join Date
    Jul 2006
    Location
    KL, Malaysia
    Posts
    123
    Rep Power
    9

    Default Bulk Provisioning

    Hi Guys,

    I am having problem using the perl script to bulk add users.

    As published here.

    The script does not chop my *.csv files properly. Does anybody have ever encountered this problem?

    Attached is my sample csv file and mydata output file.

    Thanx.
    Attached Files Attached Files

  2. #2
    scalper is offline Partner (VAR/HSP)
    Join Date
    Jul 2006
    Location
    KL, Malaysia
    Posts
    123
    Rep Power
    9

    Default Rezolved!

    Problem resolved after mingling a bit with the perl script.

    Code:
    #!/usr/bin/perl
    
    # Lookup the valid COS (Class of Service) ID in the interface
    # TODO: Find a way to map this automatically from the name rather than ID
    
    my $domain = "domain.name.here";
    my $password ="abc123";
    
    while (<>) {
           chomp;
    
           # CHANGE ME: To the actual fields you use in your CSV file
           my ($uid, $first, $last) = split(/\,/, $_, 3);
    
           print qq{ca $uid\@$domain $password\n};
           print qq{ma $uid\@$domain givenName "$first"\n};
           print qq{ma $uid\@$domain sn "$last"\n};
           print qq{ma $uid\@$domain cn "$uid"\n};
           print qq{ma $uid\@$domain displayName "$first $last"\n};
           print qq{ma $uid\@$domain zimbraPasswordMustChange TRUE\n};
    }
    Updated the wiki. Replaced :-

    Code:
    my ($email, $password, $first, $last) = split(/\t/, $_, 4);
    with

    Code:
    my ($email, $password, $first, $last) = split(/\,/, $_, 4);
    That should do it.
    Last edited by scalper; 07-31-2006 at 06:33 AM.

  3. #3
    gigapipe is offline Member
    Join Date
    Mar 2007
    Posts
    11
    Rep Power
    8

    Default execute perl command to convert csv to zmprov file

    Hi Scalper and everybody,

    I have a csv file with the information of my AD users but I dont know how to execute the perl script you've used.

    Could you please give me a light on this, thanks.

    Felipe

  4. #4
    scalper is offline Partner (VAR/HSP)
    Join Date
    Jul 2006
    Location
    KL, Malaysia
    Posts
    123
    Rep Power
    9

    Default

    as a reference

    ./script.pl < user.csv > user.zmp

    cp user.zmp /opt/zimbra

    su - zimbra

    zmprov < user.zmp

    cheers!

  5. #5
    gigapipe is offline Member
    Join Date
    Mar 2007
    Posts
    11
    Rep Power
    8

    Default

    Thanks, it works!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. DomainKeys / Digital Signaure to avoid Yahoo! Bulk Mail
    By Kirkaiya in forum Administrators
    Replies: 15
    Last Post: 04-12-2010, 04:44 AM
  2. Zimbra + Samba bulk account provisioning
    By mficara in forum Administrators
    Replies: 3
    Last Post: 06-14-2007, 07:33 PM
  3. Sample SOAP provisioning Script
    By netjunkie in forum Developers
    Replies: 4
    Last Post: 03-29-2007, 11:11 AM
  4. Bulk mail
    By nanosani in forum Administrators
    Replies: 1
    Last Post: 02-27-2007, 01:08 AM
  5. Bulk User Creation
    By mohan_rahul in forum Administrators
    Replies: 3
    Last Post: 05-16-2006, 10:25 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
  •