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.
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.
Problem resolved after mingling a bit with the perl script.
Updated the wiki. Replaced :-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}; }
withCode:my ($email, $password, $first, $last) = split(/\t/, $_, 4);
That should do it.Code:my ($email, $password, $first, $last) = split(/\,/, $_, 4);
Last edited by scalper; 07-31-2006 at 06:33 AM.
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
as a reference
./script.pl < user.csv > user.zmp
cp user.zmp /opt/zimbra
su - zimbra
zmprov < user.zmp
cheers!![]()
Thanks, it works!
There are currently 1 users browsing this thread. (0 members and 1 guests)