Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: shawnbishop on July 23, 2007, 05:50:51 PM

Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: shawnbishop on July 23, 2007, 05:50:51 PM
Good Day

I am using the lat-pseudonym tool from lazy admin.

I have created a file which has the email address for a user

eg user1 ---- user1@domain.com

When I try to restore this file

lat-pseudonym -a -i pseudonymfile

It fails saying the @ symbol is not a valid character, but it tells you in the instructions on the SME Server manager that it is valid.

Now I have 697 users with 697 pseudonyms which are email addresses, and I don't want to add each one manually.

How can I stop this problem??

cheers

Shawn
Title: Re: lat-pseudonyms fails when files has the @ symbol in it
Post by: CharlieBrady on July 23, 2007, 09:07:52 PM
Quote from: "shawnbishop"

How can I stop this problem??


Please report any problem you find (including a problem with a contrib) via the Bug Tracker.
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: shawnbishop on July 25, 2007, 02:21:27 PM
I dont think it is a bug???

I am sure somebody else would have brought the issue up if it was...and I searched the forum with no answer...

I have posted the errors in another Forum post.
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: bpivk on July 25, 2007, 02:32:08 PM
Quote from: "shawnbishop"
I dont think it is a bug???

I am sure somebody else would have brought the issue up if it was...and I searched the forum with no answer...

I have posted the errors in another Forum post.

It doesn't matter if you're the only one that stumbles across this problem, it's still a bug unles the devs say so. So please post it and don't let us beg because you'll save the next person a lot of problems if the bug gets fixed.

I don't say that it's a bug but it could be a potential problem or a NFR.
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: Franco on July 25, 2007, 06:11:45 PM
Quote from: "shawnbishop"
I dont think it is a bug???

I am sure somebody else would have brought the issue up if it was...and I searched the forum with no answer...

I have posted the errors in another Forum post.


And you're totally right, this is not a bug!
The way both users and pseudo works is by creating users and pseudos accordingly to the main domain, so the @ sign does not get included:
Code: [Select]
user1      | user.1| user_1
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: CharlieBrady on July 25, 2007, 07:38:37 PM
Quote from: "stuntshell"

The way both users and pseudo works is by creating users and pseudos accordingly to the main domain...


Pseudonyms can be without domain (and appear in every domain) or can be in a specific domain only.
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: Franco on July 25, 2007, 08:45:10 PM
Quote from: "CharlieBrady"
Quote from: "stuntshell"

The way both users and pseudo works is by creating users and pseudos accordingly to the main domain...


Pseudonyms can be without domain (and appear in every domain) or can be in a specific domain only.


Code: [Select]
cat /usr/doc/lazy-admin-tools/example.pseudonyms
#  UserName      : Must be an existing account on the server.
#  Pseudonym1..n : Must contain only lower-case letters, numbers, hyphens,
#                  periods and underscores, and should start with a lower-case
#                  letter.
#
#  @ Mandatory field
#
#-------------------------------------------------------------------------------,
# UserName@   |Pseudonym1@  |Pseudonym2   |Pseudonym3   | etc...                |
#-------------------------------------------------------------------------------'
marco         | sales       | support     |info
root          | abuse       | noc         | security    | hostmaster | sysadmin
root          | www | webmaster
michiel | michiel.blotwijk
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: mmccarn on July 26, 2007, 03:51:25 AM
In SME 7 it is possible to create (and therefore 'export') a pseudonym that contains an '@', as long as what follows the '@' is a valid local domainname.  

I don't think this was possible in SME 6.
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: shawnbishop on July 26, 2007, 10:09:14 AM
I have followed the layout of the paeudonym sample file...as follows

lgomarp|lg.omarp|omarp@3logics.co.za|lg_omarp

(where lgomarp is a valid user on the server, 3logics.co.za is a valid domain on the server)

when i do the following

#lat-pseudonym -a -i Pseudonyms

I get the following error

The pseudonym 'omarp@3logics.co.za' contains illegal characters. The name should contain only
lower-case letters, numbers, hyphens, periods and underscores, and should
start with a lower-case letter.
Creating pseudonym 'lg_omarp' for user lgomarp...

So it is adding all the other pseudonyms, but not the pseudonym with the "@" symbol in it, but this should be valid as it is an email address

Anybody know how to go about fixing this???
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: Stefano on July 26, 2007, 10:45:01 AM
Quote from: "shawnbishop"
I have followed the layout of the paeudonym sample file...as follows

lgomarp|lg.omarp|omarp@3logics.co.za|lg_omarp

(where lgomarp is a valid user on the server, 3logics.co.za is a valid domain on the server)

when i do the following

#lat-pseudonym -a -i Pseudonyms

I get the following error

The pseudonym 'omarp@3logics.co.za' contains illegal characters. The name should contain only
lower-case letters, numbers, hyphens, periods and underscores, and should
start with a lower-case letter.
Creating pseudonym 'lg_omarp' for user lgomarp...

So it is adding all the other pseudonyms, but not the pseudonym with the "@" symbol in it, but this should be valid as it is an email address

Anybody know how to go about fixing this???


take a lokk here: http://forums.contribs.org/index.php?topic=36720.0

it's in italian, but the steps are clear enough I hope..

HTH

Ciao

Stefano
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: mmccarn on July 26, 2007, 03:53:33 PM
Or like this:
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


However, this doesn't do any checking to see if a pseudonym containing an '@' is followed by a local domain name...  so, while this modification will lat you import your exported pseudonyms containing '@', it may also allow you to create problems on your SME...
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: shawnbishop on July 27, 2007, 06:23:10 PM
Thx...

Sorry I dont understand what just went on???? :?

The sed command that I need to run, what must I run it on...my file containg the Pseudonyms??

Is it 3 separate commands??

I do apologise for my questions, I checked the Italian posting and I must admit, my Italian is terrible ( that is none existence), so I dont know what they are talking about

Cheers
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: shawnbishop on July 27, 2007, 06:37:55 PM
Ok !!!


I got it, sorry just read the post and paniced..then read slowley again..and all became crystal clear...

 :lol:

Thanks

So this sed fixes the lat-pseudonyms script for lazy admin tools
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: mmccarn on July 29, 2007, 05:08:35 AM
Quote from: "shawnbishop"
So this sed fixes the lat-pseudonyms script for lazy admin tools
No, this doesn't fix lazy admin tools -- it just lets you import pseudonyms with '@' in them.

This patch allows my-lat-pseudonyms to create all sorts of pseudonyms that are illegal (hi@there, gwb@whitehouse.gov) without doing any data verification - so is more in the area of "dangerous" than "fixed"...
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: shawnbishop on August 03, 2007, 07:02:23 PM
Ok great, but this "fix" has saved me a lot of time...cheers

What I dont understand is int he instructions for the Pseudonyms it says you can create pseudonyms with "@" in it. But the lat-pseudonym script doesnt allow you to??

But anyway, grateful I found a workaround.
Title: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: mmccarn on August 03, 2007, 10:44:20 PM
lat-pseudonyms was written for SME 5 or 6, and only marginally converted to operate without generating error messages when SME 7 was released.

I don't think that SME 5 or 6 supported pseudonyms containing '@', hence the restriction...
Title: Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: CharlieBrady on October 29, 2010, 10:59:24 PM
What I dont understand is int he instructions for the Pseudonyms it says you can create pseudonyms with "@" in it. But the lat-pseudonym script doesnt allow you to??

Maybe because there is a bug in the lat-pseudonym that hasn't yet been reported to its author, via the bug tracker.
Title: Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: cactus on October 29, 2010, 11:07:34 PM
Maybe because there is a bug in the lat-pseudonym that hasn't yet been reported to its author, via the bug tracker.
It is not reported AFAICT, but even the bugtracker marks it as unsupported (http://bugs.contribs.org/buglist.cgi?product=SME%20Contribs&component=UNSUPPORTED-e-smith-lazy_admin_tools&resolution=---).

The package was abandoned some years ago, but it seems there is still some interest. So perhaps someone is willing to step up and maintain it.
Title: Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: bloodshoteye on November 03, 2010, 08:06:46 AM
The package was abandoned some years ago, but it seems there is still some interest. So perhaps someone is willing to step up and maintain it.

I use lat-users a lot with SME7.5.1 to bulk add/delete users - a most useful tool in a public education environment.
lat-users, being part of the lat-tools package is *very* important to us.

I sure hope someone will maintain it as shawnbishop and I can't be the only current users?

Cheers,
Title: Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: CharlieBrady on November 03, 2010, 03:26:07 PM
I use lat-users a lot with SME7.5.1 to bulk add/delete users - a most useful tool in a public education environment.

Then perhaps someone in the public education environment should step forward and undertake, or fund, maintenance.
Title: Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
Post by: wbell on December 28, 2012, 04:26:55 PM
I see that LAT is in the SME8 repository.
Is it safe to say that the following command will work correctly?
And if so, has the '@' symbol issue been resolved in this release?

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]: