Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: jane on April 11, 2003, 12:18:42 PM

Title: abl-batch_users-0.5 - again!
Post by: jane on April 11, 2003, 12:18:42 PM
Hi,

I've try to make what I want by follow your instruction (Abe Loveless) but failed. Kindly I need your assistance again to give more details as I'm not clear in your words

"In line 42, you'll need to add the new variables in the system call that calls the "adduser" script. The format of the line should look like this:
acctName, Passwd, firstName, lastName, department, company, street, city, phone"

Actually I want to add user with the following format.

USERNAME:PASS:FIRSTNAME:LASTNAME:GROUP:DEPARTMENT:COMPANY:STREETADDR:CITY:PHONENO

Thanks again.
Title: Re: abl-batch_users-0.5 - again!
Post by: Abe Loveless on April 11, 2003, 07:16:48 PM
Right.... that's the format of your file, which is fine.

The difference is that the file script.pl actually calls another script to create the user... then when control returns to the original script it adds the username to the group.

So, what I meant to say above is that on line 42, you have to edit the variables so that it sends the correct fields to the "adduser" script so the user can be created.

Here's an example:

Line 42:  system("echo $input_split[0]:$input_split[1]:$input_split[2]:$input_split[3] | $ARGV[0]");

Where $input_split[NUM] are the following values:
[NUM] are the following values:
Title: Re: abl-batch_users-0.5 - again!
Post by: jane on April 12, 2003, 11:03:15 PM
Hi,

I have modify the script.pl by follow your instruction. I just make $input_split[5] for the first testing. I modify also file adduser and change performCreateUser($1, $2, $3, $4, $5, "", "", "", "") at line 92.

Do I have finish the modification? And I got this error.

Use of uninitialized value in pattern match (m//) at ./adduser line 177, DIN> line 1.

Your advice again are really much appreciated. Thanks.
Title: Re: abl-batch_users-0.5 - again!
Post by: jane on April 14, 2003, 09:37:26 AM
Now everythings was fine. I forgot to add as below at line 53

system("echo $input_split[0] ......:$input_split[5] | $ARGV[0]");

Thank you very much!!!
Title: Re: abl-batch_users-0.5 - again!
Post by: Alejandro Lengua on May 14, 2003, 05:36:04 PM
Where can I get a script to add users by batch (that works in SME 5.6)?
Title: Re: abl-batch_users-0.5 - again!
Post by: Abe Loveless on May 14, 2003, 09:23:42 PM
http://www.tech-geeks.org/contrib/loveless/batch_users/