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???

Online 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.