Koozali.org: home of the SME Server

Lazy Admin Tools

Offline wbell

  • ***
  • 49
  • +0/-0
Lazy Admin Tools
« on: December 28, 2012, 04:13:52 PM »
From the searches and posts that I've read, it seems that the Lazy Admin Tools (LAT) have not been updated/maintained in quite a while.  So, I have a few questions...
  • Does LAT work on SME8?
  • If not, what is the recommended mass account-creation method?
  • If so, are there any bugs (other than '@' in pseudonyms)?
  • Are there any plans to update LAT for repository (yum) installs?
Thanks, for any info.

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Lazy Admin Tools
« Reply #1 on: December 28, 2012, 04:20:58 PM »
I see, now, that LAT is in the SME8 repository.
Is it safe to say that the following command will work?

Code: [Select]
yum --enablerepo=smecontribs install smeserver-lazy_admin_tools

It appears to find and want to install LAT v1.0-1.el5.sme

Code: [Select]
===================================================================================================
 Package                            Arch           Version               Repository           Size
===================================================================================================
Installing:
 smeserver-lazy_admin_tools         noarch         1.0-1.el5.sme         smecontribs          68 k

Transaction Summary
===================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 68 k
Is this ok [y/N]:

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Lazy Admin Tools
« Reply #2 on: December 28, 2012, 04:35:34 PM »
wbell

The contrib does not appear here
http://wiki.contribs.org/SME8.0_Contribs_QA
so no-one has yet reviewed it & reported, so maybe you can be the first.
As you say it has been put into the sme 8 contribs repo.

Clearly JPialasse has created the rpm way back in May 2012, so I would imagine it should install OK.

CHANGELOG       
* Sun May 27 12:00:00 2012 JP PIALASSE tests@pialasse.com  1.0-1.sme
- Initial version
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • *****
  • 4,812
  • +0/-0
« Last Edit: December 28, 2012, 05:22:17 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Lazy Admin Tools
« Reply #4 on: December 28, 2012, 10:34:20 PM »
The install works well, but there are a few bugs I hit, already.
  • During install, the scripts are not given proper permissions in /usr/sbin (Bug 7138)
  • When updating a user, WARNINGS are generated when 'rssh.conf' is expanded (Submitted Bug 7192)
Code: [Select]
Dec 28 15:17:53 TEST-SERVER esmith::event[4791]: expanding /etc/rssh.conf 
Dec 28 15:17:53 TEST-SERVER esmith::event[4791]: WARNING in /etc/e-smith/templates//etc/rssh.conf/40users: Use of uninitialized value in string eq at /etc/e-smith/templates//etc/rssh.conf/40users line 17. 
Dec 28 15:17:53 TEST-SERVER esmith::event[4791]: WARNING: Template processing succeeded for //etc/rssh.conf: 1 fragment generated warnings 
Dec 28 15:17:53 TEST-SERVER esmith::event[4791]:  at /etc/e-smith/events/actions/generic_template_expand line 56
« Last Edit: December 28, 2012, 10:39:26 PM by wbell »

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Lazy Admin Tools
« Reply #5 on: January 03, 2013, 05:51:00 PM »
I've managed to work past the WARNINGS, by inserting the following code into Line 73 of '/usr/sbin/lat-users'.

ORIGINAL Code:
Code: [Select]
"Street", $fields[6],
MODIFIED Code:
Code: [Select]
"Shell", "/usr/bin/rssh",
"VPNClientAccess", "no",
"Street", $fields[6],

** PLEASE NOTE: When updating users with 'lat-users' the 'Uid' is changed in '/home/e-smith/db/accounts'.  I don't think this is supposed to happen (Uid is not changed, when using Server-Manger), so I would only suggest using 'lat-users' to create users, at this time.  Also... 'lat-users' does not create the default 'firstname.lastname' and 'firstname_lastname' pseudonyms, like Server-Manager does, during the user creation process.  To create the default pseudonyms, you will either need to run the 'lat-pseudonyms' script, or click 'Modify' and 'Save' on every user in Server-Manager.

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Lazy Admin Tools
« Reply #6 on: January 08, 2013, 05:14:50 PM »
It looks like 'lat-groups' has issues too.  I see three warnings that occur.
The first code-wrap is the warnings only.  The second code-wrap is the entire 'messages' event log.
These WARNINGS only seem to happen when using 'lat-groups' to CREATE a new group.  Adding users to an existing group works without errors.

WARNINGS Only:
Code: [Select]
...
Jan  8 09:53:44 TEST-SERVER esmith::event[5912]: useradd: warning: the home directory already exists. 
...
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: WARNING in /etc/e-smith/templates//var/qmail/alias/.qmail-group/50group_members: Use of uninitialized value in split at /etc/e-smith/templates//var/qmail/alias/.qmail-group/50group_members line 4. 
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: WARNING: Template processing succeeded for //var/qmail/alias/.qmail-testgroup: 1 fragment generated warnings 
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]:  at /etc/e-smith/events/group-create/S20qmail-update-group line 78 
...


ENTIRE 'messages' Event Log:
Code: [Select]
Jan  8 09:53:44 TEST-SERVER /usr/sbin/lat-groups[5911]: /home/e-smith/db/accounts: OLD testgroup=(undefined)
Jan  8 09:53:44 TEST-SERVER /usr/sbin/lat-groups[5911]: /home/e-smith/db/accounts: NEW testgroup=group|Description|Test Group|Gid|5652|Uid|5652
Jan  8 09:53:44 TEST-SERVER esmith::event[5912]: Processing event: group-create testgroup
Jan  8 09:53:44 TEST-SERVER esmith::event[5912]: Running event handler: /etc/e-smith/events/group-create/S04group-create-unix
Jan  8 09:53:44 TEST-SERVER esmith::event[5912]: useradd: warning: the home directory already exists. 
Jan  8 09:53:44 TEST-SERVER esmith::event[5912]: Not copying any file from skel directory into it. 
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: Group testgroup successfully added! 
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: User testgroup successfully added! 
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: User testgroup successfully modified! 
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: User admin successfully modified! 
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: User www successfully modified! 
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: S04group-create-unix=action|Event|group-create|Action|S04group-create-unix|Start|1357660424 574359|End|1357660425 912010|Elapsed|1.337651
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: Running event handler: /etc/e-smith/events/actions/generic_template_expand
Jan  8 09:53:45 TEST-SERVER esmith::event[5912]: expanding /var/qmail/control/badrcptto 
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: expanding /var/service/qpsmtpd/config/goodrcptto 
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: generic_template_expand=action|Event|group-create|Action|generic_template_expand|Start|1357660425 912344|End|1357660426 307168|Elapsed|0.394824
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: Running event handler: /etc/e-smith/events/group-create/S20qmail-update-group
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: WARNING in /etc/e-smith/templates//var/qmail/alias/.qmail-group/50group_members: Use of uninitialized value in split at /etc/e-smith/templates//var/qmail/alias/.qmail-group/50group_members line 4. 
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: WARNING: Template processing succeeded for //var/qmail/alias/.qmail-testgroup: 1 fragment generated warnings 
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]:  at /etc/e-smith/events/group-create/S20qmail-update-group line 78 
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: S20qmail-update-group=action|Event|group-create|Action|S20qmail-update-group|Start|1357660426 307556|End|1357660426 478901|Elapsed|0.171345
Jan  8 09:53:46 TEST-SERVER esmith::event[5912]: Running event handler: /etc/e-smith/events/group-create/S56update-domain-group-maps
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: No rid or sid specified, choosing a RID 
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: Got RID 12305 
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: Successfully added group Test Group to the mapping db as a domain group 
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: S56update-domain-group-maps=action|Event|group-create|Action|S56update-domain-group-maps|Start|1357660426 479230|End|1357660427 143335|Elapsed|0.664105
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: Running event handler: /etc/e-smith/events/actions/adjust-services
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: adjusting supervised smbd (sighup) 
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: adjusting supervised smbd (up) 
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: adjust-services=action|Event|group-create|Action|adjust-services|Start|1357660427 143690|End|1357660427 214146|Elapsed|0.070456
Jan  8 09:53:47 TEST-SERVER esmith::event[5912]: Running event handler: /etc/e-smith/events/group-create/S95ldap-update-simple
Jan  8 09:53:54 TEST-SERVER esmith::event[5912]: S95ldap-update-simple=action|Event|group-create|Action|S95ldap-update-simple|Start|1357660427 214386|End|1357660434 461093|Elapsed|7.246707
Jan  8 09:53:54 TEST-SERVER /usr/sbin/lat-groups[5911]: /home/e-smith/db/accounts: OLD testgroup=group|Description|Test Group|Gid|5652|Uid|5652
Jan  8 09:53:54 TEST-SERVER /usr/sbin/lat-groups[5911]: /home/e-smith/db/accounts: NEW testgroup=group|Description|Test Group|Gid|5652|Members|testuser|Uid|5652
Jan  8 09:53:54 TEST-SERVER esmith::event[5959]: Processing event: group-modify testgroup
Jan  8 09:53:54 TEST-SERVER esmith::event[5959]: Running event handler: /etc/e-smith/events/actions/generic_template_expand
Jan  8 09:53:54 TEST-SERVER esmith::event[5959]: expanding /var/qmail/control/badrcptto 
Jan  8 09:53:54 TEST-SERVER esmith::event[5959]: expanding /var/service/qpsmtpd/config/goodrcptto 
Jan  8 09:53:54 TEST-SERVER esmith::event[5959]: generic_template_expand=action|Event|group-modify|Action|generic_template_expand|Start|1357660434 560443|End|1357660434 979553|Elapsed|0.41911
Jan  8 09:53:54 TEST-SERVER esmith::event[5959]: Running event handler: /etc/e-smith/events/group-modify/S15group-modify-unix
Jan  8 09:53:55 TEST-SERVER esmith::event[5959]: User testgroup successfully modified! 
Jan  8 09:53:55 TEST-SERVER esmith::event[5959]: Group testgroup successfully modified! 
Jan  8 09:53:55 TEST-SERVER esmith::event[5959]: User testuser successfully modified! 
Jan  8 09:53:55 TEST-SERVER esmith::event[5959]: S15group-modify-unix=action|Event|group-modify|Action|S15group-modify-unix|Start|1357660434 979890|End|1357660435 808095|Elapsed|0.828205
Jan  8 09:53:55 TEST-SERVER esmith::event[5959]: Running event handler: /etc/e-smith/events/group-modify/S20qmail-update-group
Jan  8 09:53:55 TEST-SERVER esmith::event[5959]: S20qmail-update-group=action|Event|group-modify|Action|S20qmail-update-group|Start|1357660435 808436|End|1357660435 905380|Elapsed|0.096944
Jan  8 09:53:55 TEST-SERVER esmith::event[5959]: Running event handler: /etc/e-smith/events/group-modify/S56update-domain-group-maps
Jan  8 09:53:56 TEST-SERVER esmith::event[5959]: S56update-domain-group-maps=action|Event|group-modify|Action|S56update-domain-group-maps|Start|1357660435 905845|End|1357660436 563411|Elapsed|0.657566
Jan  8 09:53:56 TEST-SERVER esmith::event[5959]: Running event handler: /etc/e-smith/events/actions/adjust-services
Jan  8 09:53:56 TEST-SERVER esmith::event[5959]: adjusting supervised smbd (sighup) 
Jan  8 09:53:56 TEST-SERVER esmith::event[5959]: adjusting supervised smbd (up) 
Jan  8 09:53:56 TEST-SERVER esmith::event[5959]: adjust-services=action|Event|group-modify|Action|adjust-services|Start|1357660436 563949|End|1357660436 636898|Elapsed|0.072949
Jan  8 09:53:56 TEST-SERVER esmith::event[5959]: Running event handler: /etc/e-smith/events/group-modify/S95ldap-update-simple
Jan  8 09:54:06 TEST-SERVER esmith::event[5959]: S95ldap-update-simple=action|Event|group-modify|Action|S95ldap-update-simple|Start|1357660436 637153|End|1357660446 489059|Elapsed|9.851906

« Last Edit: January 08, 2013, 05:17:17 PM by wbell »

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Lazy Admin Tools
« Reply #7 on: January 15, 2013, 04:27:07 PM »
From my notes, this is how I installed this package:

Code: [Select]
wget  http://www.sme-server.de/download/sme7/contribs/smeserver-lazy_admin_tools-0.9.1-2.noarch.rpm
yum -y localinstall smeserver-lazy_admin_tools-0.9.1-2.noarch.rpm

Followed by a patch:
Code: [Select]
sed s/'\[a-z\\-\\_\\d\\.\]'/'\[a-z\\-\\_\\d\\.\\@\]'/ \
/usr/sbin/lat-pseudonyms > /usr/sbin/my-lat-pseudonyms
chmod 770 /usr/sbin/my-lat-pseudonyms

I don't remember where I picked this up, tho...
Sophie from Montréal

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Lazy Admin Tools
« Reply #8 on: January 16, 2013, 03:03:09 PM »
From my notes, this is how I installed this package:

Code: [Select]
wget  http://www.sme-server.de/download/sme7/contribs/smeserver-lazy_admin_tools-0.9.1-2.noarch.rpm
yum -y localinstall smeserver-lazy_admin_tools-0.9.1-2.noarch.rpm

Followed by a patch:
Code: [Select]
sed s/'\[a-z\\-\\_\\d\\.\]'/'\[a-z\\-\\_\\d\\.\\@\]'/ \
/usr/sbin/lat-pseudonyms > /usr/sbin/my-lat-pseudonyms
chmod 770 /usr/sbin/my-lat-pseudonyms

I don't remember where I picked this up, tho...

This was the manual install for SME7, which also has issues on SME8.
SME8 has it's own contrib, which has similar issues.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Lazy Admin Tools
« Reply #9 on: January 17, 2013, 01:52:48 AM »
Perhaps time to open a bug with all information, JPialasse would probably appreciate knowing about your experiences, not sure if he has time to trawl the Forums.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Lazy Admin Tools
« Reply #10 on: January 17, 2013, 10:19:22 PM »
Perhaps time to open a bug with all information, JPialasse would probably appreciate knowing about your experiences, not sure if he has time to trawl the Forums.

Thanks for the suggestion, but I've already submitted some bug reports regarding these issues.  =)

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Lazy Admin Tools
« Reply #11 on: January 17, 2013, 10:44:52 PM »
Thanks for the suggestion, but I've already submitted some bug reports regarding these issues.  =)

My bad, sorry.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline wbell

  • ***
  • 49
  • +0/-0
Re: Lazy Admin Tools
« Reply #12 on: January 23, 2013, 03:39:45 PM »
My bad, sorry.

No need to be sorry.  I just hope that someone will pick up this project, again!
« Last Edit: January 23, 2013, 04:25:04 PM by wbell »