Koozali.org formerly Contribs.org

lat-pseudonyms fails if files has the @ symbol in it - FIXED

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

Re: lat-pseudonyms fails when files has the @ symbol in it
« Reply #1 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.

lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #2 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.

Offline bpivk

  • *
  • 908
    • http://www.bezigrad.com
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #3 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.
"It should just work" if it doesn't report it. Thanks!

Offline Franco

  • *
  • 1,170
    • http://contribs.org
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #4 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

lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #5 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.

Offline Franco

  • *
  • 1,170
    • http://contribs.org
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #6 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

Offline mmccarn

  • *
  • 2,415
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #7 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.

lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #8 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???

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #9 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
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline mmccarn

  • *
  • 2,415
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #10 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...

lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #11 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

lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #12 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

Offline mmccarn

  • *
  • 2,415
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #13 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"...

lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #14 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.

Offline mmccarn

  • *
  • 2,415
lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #15 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...

Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #16 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.

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #17 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.

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.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline bloodshoteye

  • ****
  • 232
  • Grateful thanks to SME devs
Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #18 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,
SME Server is a fantastic product - thank you!

Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #19 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.

Offline wbell

Re: lat-pseudonyms fails if files has the @ symbol in it - FIXED
« Reply #20 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]: