Adding 1000 new users with full information

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

Nexis
Posts: 72
Joined: Wed May 10, 2006 4:55 am

Adding 1000 new users with full information

Postby Nexis » Sat May 20, 2006 6:26 pm

Are there people who have scripts to do omaddu command. Where you can fill in all the option username, mail adres, display adres, adresbook info + group informatio, password,...
So that I can prepare this in a file and at it in batch?

Thanks Koen

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Tue May 23, 2006 7:52 am

Some of that info is actually in the SYSTEM directory and not the user's information. Check out the man pages for omaddu and omaddent.

Basically the following is settable via omaddu (output from omshowu):

Authentication ID: sxadmin
User Name : Scalix Administrator /CN=Scalix Administrator
MailNode : <removed>
Internet Address : <removed>
System Login : sxadmin
Password : set
Admin Capabilities : YES
Mailbox Admin Capabilities : NO
Language : ENGLISH
Mail Account: Unlocked
Receipt of mail : ENABLED
Service level : 0
Excluded from Tidying : NO
User Class : Full

The other information will need to be populated into the directory with ommodent AFTER ommodu has been run.

I suggest you create a user and populate all the attributes, then do

omsearch -e 'S=lastname/G=firstname' and check the output, it will show you the attributes in use.

Here is an example:

S=Lastname/G=Firstname/OU1=mailnode/CN=Displayname/CNTRY=Country Code/PHONE-1=Work Phone/MOBILE-PHONE=Mobile Number/FAX=Fax Number/STREET-ADDRESS=Street Address/L=City/STATE-OR-PROVINCE=My Province/POSTAL-CODE=My Postal Code/HOME-PHONE=Home Number

To change the work phone and mobile numbers do:

ommodent -e 'S=lastname/G=firstname/OU1=mailnode-1/OU2=mailnode-2' -n 'PHONE-1=1234567890/MOBILE-PHONE=0987654321'

You need to specify enough parameters to the '-e' to uniquely identify the user.

hydrospace
Posts: 54
Joined: Tue Mar 01, 2005 11:44 am
Location: Leipzig, germany
Contact:

Postby hydrospace » Tue May 23, 2006 8:25 am

where you get the data of the users from? I guess you will provide a source file with each user and its properties. Then a script should run tru it and execute the omaddu command? Am I right? Or do you use Active Directory or similar?

--Stefan

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Tue May 23, 2006 8:29 am

Yes, you'll need a source of information. If you've got it in a file, you can use a script to generate the omaddu and ommodent commands. If you have got it in a LDAP tree (eg. MS AD), then you can set up a omldapsync agreement to get the information from there.

Nexis
Posts: 72
Joined: Wed May 10, 2006 4:55 am

Postby Nexis » Sat May 27, 2006 5:52 pm

It is a dump from an SAP database. Normally I get all that information in a excell file. Can you give a example how to automate the omaddu and add all addition info for a few users?
Thanks Koen

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Mon May 29, 2006 9:01 am

Well, if you've got it in a CSV file, eg.

Code: Select all

Firstname, Lastname, Displayname, Email address, Home Phone
You can then do something like the following perl code:

Code: Select all

open INFILE "users.csv";
open OUTFILE ">usermod.sh";
while (<INFILE>) {
  ($first, $last, $dn, $email, $homephone) = split (",");
  $last ~= s/ /_/;
  print OUTFILE "/opt/scalix/bin/omaddu -n '$first $last/CN=$dn/IA=$email'\n";
  print OUTFILE "/opt/scalix/bin/ommodent -e 'S=$last/G=$first/HOME-PHONE=$homephone'\n";
  print OUTFILE "\n";
}
close OUTFILE;
close INFILE;


Please note that this is not tested code, just a snippet to give you some insight into how I would do it. It needs more things (like checks for empty values). You can also use the DBI module in perl to extract the info directly from the database. I like to pre-generate the commands, because then I can do a QC on the results myself (is there a user with incorrect info, or which I translated incorrectly?)

You can also use omloadfile from the Admin Resource Kit in your download media.

Nexis
Posts: 72
Joined: Wed May 10, 2006 4:55 am

Postby Nexis » Mon May 29, 2006 10:59 am

I tryed the omloadfile command, but I can't find the syntacs to add Firstname, Lastname, Displayname, Email address, Home Phone

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Tue May 30, 2006 4:07 am

You may want to look at the following threads:

http://www.scalix.com/community/viewtop ... omloadfile
http://www.scalix.com/community/viewtop ... omloadfile
http://www.scalix.com/community/viewtop ... omloadfile

Also, there's a document on the Knowledge Base titled Advanced Directory and Mailbox Provisioning that will assist you.


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 5 guests