Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: FISKO on June 14, 2007, 12:29:03 PM

Title: Bulk Import of users
Post by: FISKO on June 14, 2007, 12:29:03 PM
Hi How can I bulk import users to sme server 7?
I tried the old bulk import versions as shown on the site and it fails with
---------------------------
Error
---------------------------
Command 'perl script.pl ./adduser user_list/user_pupils.txt'
failed with return code 0 and error message
*WARNING* esmith::config(/home/e-smith/accounts) called with old database path. The following package needs to be updated:  at /usr/lib/perl5/site_perl/esmith/config.pm line 374
   esmith::config::TIEHASH('esmith::config', '/home/e-smith/accounts') called at script.pl line 11.
---------------------------
OK  
---------------------------

Any ideas?
Thanks
Title: Bulk Import of users
Post by: kmac on June 14, 2007, 01:01:47 PM
Search for lat (lazy admin tools)
It uses a .csv file that can create users, passwords, groups, etc.
Title: Re: Bulk Import of users
Post by: stephen noble on June 14, 2007, 01:10:27 PM
Quote from: "FISKO"

   esmith::config::TIEHASH('esmith::config', '/home/e-smith/accounts') called at script.pl line 11.


line 11 of your script
see the sticky referring to changed db locations
Title: db location?
Post by: FISKO on June 14, 2007, 01:54:24 PM
sorry new to sme server how do I cure my problem?
thanks
Title: Bulk Import of users
Post by: del on June 14, 2007, 02:19:11 PM
Hi FISKO,

Welcome to SME :D
Take a look here: http://mirror.contribs.org/smeserver/contribs/mblotwijk/Contribs/lazy-admin-tools/
This may help :wink:

Regards,
Del
Title: Intalling the RPM
Post by: FISKO on June 14, 2007, 06:44:09 PM
How do I install the RPM? can I do this via winscp? and how?
Thanks
Title: Bulk Import of users
Post by: del on June 14, 2007, 11:02:49 PM
Hi FISKO,

You need to download the rpm, I normally do this to my Windows PC desktop and then move it to the server using winscp. I created an i-bay called contribs on my server and this is where I put my rpms (in a folder,for example called lat_tools which I create beforehand) and then I use putty and cd to the folder, in this example:

cd /home/e-smith/files/ibays/contribs/files/lat_tools

Then you can do the command:

yum localinstall ./*.rpm

Then you can read the manual etc that is available for download here:
http://mirror.contribs.org/smeserver/contribs/mblotwijk/Contribs/lazy-admin-tools/
This will tell you how to use the tools.

Good luck,
Del :D
Title: BULK USER
Post by: FISKO on June 15, 2007, 09:15:53 AM
Thanks for your help, will try your suggestions  :wink:
Title: STILL FAILS
Post by: FISKO on June 15, 2007, 10:39:49 AM
Hi still having problems, now fails with:
---------------------------
Error
---------------------------
Command 'lat-users -a -i /root/users.list'
failed with return code 2 and error message
*WARNING* esmith::config(/home/e-smith/accounts) called with old database path. The following package needs to be updated:  at /usr/lib/perl5/site_perl/esmith/config.pm line 374
   esmith::config::TIEHASH('esmith::config', '/home/e-smith/accounts') called at /usr/sbin/lat-users line 17
Can't find /root/users.list..
---------------------------
OK  
---------------------------
any ideas? thanks once again
Title: Bulk Import of users
Post by: mmccarn on June 15, 2007, 03:55:50 PM
It looks like the link provided earlier points you to a 2004 version of lazy admin tools for SME 6

Here's a post on how to download & install a version that I've tested on SME 7: http://forums.contribs.org/index.php?topic=37284.0

The download link in that post points to smeserver-lazy_admin_tools-0.9.1-2 from October 2006 in jbennett's contribs folder: http://mirror.contribs.org/smeserver/contribs//jbennett/sme7/lat/

I suspect you should uninstall the older rpm before installing the new one...

Find out what version you have installed with
Code: [Select]
rpm -q smeserver-lazy_admin_tools

Remove it with:
Code: [Select]
yum remove smeserver-lazy_admin_tools or
Code: [Select]
rpm -e  smeserver-lazy_admin_tools
Title: BULK USER
Post by: FISKO on June 15, 2007, 04:04:23 PM
Wow thanks for your help all now works great!
Next prob is how to keep all these settings and migrate to a faster PC  8)
Title: Bulk Import of users
Post by: mmccarn on June 15, 2007, 04:35:12 PM
'affa' will let you migrate everything (with a little effort)

'lat-dump' will dump (most?) of your sme configuration to files and create a script called 'lat-restore' to re-apply them to the same or another server...

Run 'lat-dump' - if all the configs you want to save are in the output files, you're golden!

'lat-dump' specifically dumps all the settings and account info for SME 6.  The october update simply changed the routines that access the SME config db, but didn't change any of the items dumped.
Title: thanks
Post by: FISKO on June 15, 2007, 04:58:15 PM
Thanks again,  8)
Title: Bulk Import of users
Post by: del on June 16, 2007, 01:47:08 AM
Hi FISKO,

Sorry about the dud link :oops:  I just did a search and that was the first one that came up :shock: I never thought to see if there was another one :oops:  Again I am sorry, but I am glad that you have it sorted out now :D

Regards,
Del