Koozali.org: home of the SME Server

Bulk Import of users

FISKO

Bulk Import of users
« 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

Offline kmac

  • **
  • 22
  • +0/-0
Bulk Import of users
« Reply #1 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.
...

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Bulk Import of users
« Reply #2 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

FISKO

db location?
« Reply #3 on: June 14, 2007, 01:54:24 PM »
sorry new to sme server how do I cure my problem?
thanks

Offline del

  • *
  • 765
  • +0/-0
Bulk Import of users
« Reply #4 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
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown

FISKO

Intalling the RPM
« Reply #5 on: June 14, 2007, 06:44:09 PM »
How do I install the RPM? can I do this via winscp? and how?
Thanks

Offline del

  • *
  • 765
  • +0/-0
Bulk Import of users
« Reply #6 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
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown

FISKO

BULK USER
« Reply #7 on: June 15, 2007, 09:15:53 AM »
Thanks for your help, will try your suggestions  :wink:

FISKO

STILL FAILS
« Reply #8 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

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Bulk Import of users
« Reply #9 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

FISKO

BULK USER
« Reply #10 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)

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Bulk Import of users
« Reply #11 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.

FISKO

thanks
« Reply #12 on: June 15, 2007, 04:58:15 PM »
Thanks again,  8)

Offline del

  • *
  • 765
  • +0/-0
Bulk Import of users
« Reply #13 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
If at first you don't succeed, then sky-diving is not for you!
"Life is like a coin. You can spend it anyway you wish, but you can only spend it once." --Author Unknown