Tags:
create new tag
view all tags

Question

I have configured TWiki to authenticate using the intranet login username. There are no problems with saving/creating topics using intranet login names that are alpha-numeric, but we get the problem below with username that are only numeric (eg: 12345). Is there a workaround without having to change the username format? We are pretty much stuck with numeric usernames.

Topic save error

During save of file Main.TestUser an error was found by the version control system. Please notify your TWiki administrator. /usr/local/bin/ci -q -l -m'none' -t-none -w'12345' '/export/web/twiki/data/Main/TestUser.txt' 2>&1 ci: invalid identifier `12345' ci aborted

Go back in your browser and save your changes locally.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: HP-UX B.11.23 U
Web server: Apache 2.0.53
Perl version: 5.8.7
Client OS: Windows XP Professional
Web Browser: Mozilla Firefox & IE
Categories: Permissions, Registration, Authentication, Security, Version control

-- TWikiGuest - 01 Nov 2005

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

If you read the RCS manual pages you will find that the -w argument takes a parameter that is expected to be a UNIX login name under normal circumstances.

Under TWiki, it is being abused a bit, since the TWikiName need not exist as a UNIX user id in /etc/passwd (or equivilent), but the parser still expects identifiers that begin with a letter rather than a number. (Hey, at least it isn't checking to see if it is in /etc/passwd.)

See the file rcslex.c in the RCS source code package.

What RCS's ci is saying to you is "if it can be a userId it better look like a userID." UNIX userIDs have to begin with a letter. Some command get very upset if they don't since it wouldn't be possible to tell if the command line parameter was an userID or another parameter.

The only cure is to change your naming scheme.

OBTW: I first met this problem back in 1982 while doing a spell on a support desk for a UNIX vendor. A police department in Texas was entering officer badge numbers as the userIDs. Non officers got 'reasonable' names.

-- AntonAylward - 01 Nov 2005


A very similar problem has already been described with Kerberos usernames (userid@REALM) and NTLM usernames (Domain\userid). So, at least, you are not alone.

Unfortunately LoginNameAliasesPlugin, which can help with Kerberos and NTLM, doesn't help here: It allows to remove strings from login names, whereas in your case the easiest solution would be to add something (e.g. "user12345" is perfectly valid for RCS). If you are interested in such a solution I suggest you bring the topic up in LoginNameAliasesPluginDev.

-- HaraldJoerg - 01 Nov 2005

Since we are now supporting having LoginNames different from TWikiNames, it might be easier just to rename the home topics and alter TWikUsers accordingly.

No login will change - the name in .htpasswd and the 3rd field in the TWikiUsers list - and the TWikiName can be made into something that RCS and TWiki find acceptable.

OBTW: You aren't using something like a social security number as the numeric ID are you? That would be a mucho bad idea and get you in trouble with the privacy & other regualtory bodies.

-- AntonAylward - 02 Nov 2005

What if I change the rcslex.c to accept all numeric identifiers?

Or if there is such a plugin that can add a string before the numeric username, will it affect how TWiki recognizes who edited the page or anything else?

BTW the numeric ID is our payroll number, not our social security number.

-- TWikiGuest - 02 Nov 2005

Yes, you can change rcslex.c, but that routines is ued in ther places and you'll break those.

In addition, an all-numeric ID is not a wikiword and that's going to come back and bite you somewhere down the line. You can start with lack of automatic linking, since it appears in quite a number of places.

Do you have any specific reason to hide the user's names? A site I manage for a professional body requires a unique registration number, the number assigned by the certifying body, which I suppose, is akin to your payroll number. That is recorded in the user's home page. But their WikiName is their real name so that they can recognise each other and to make accountability easy. Late Model TWiki allows username to be different from WikiName and to have any authentication back-end you like.

I feel that you'd be better off using names and just keeping a record of the payroll number. After all, you can do what I do with membership numbers and extract it using $formfield().

-- AntonAylward - 02 Nov 2005

My TWiki setup uses an LDAP authentication back-end. So all of our users have to authenticate against the LDAP using their intranet login name (all numeric payroll ID) to access our TWiki pages. They also have to register in TWiki for their TWiki username (which is a wikiword). I believe TWiki is able to map a user's intranet login name (stored in the REMOTE_USER environment variable) to their TWiki username. My question is how come when the 'ci' command is invoked it uses their intranet login name? Can I change it where it gets the user's TWiki username based on their intranet login name, and use the TWiki username instead for the 'ci' command? Anyone knows how would I implement this change in TWiki or have any better suggestions?

-- JovPangestu - 03 Nov 2005

If I was in your situation I would:

  1. Install the forthcoming DakarRelease and see ensure you experience the same problem
  2. In the configure interface, try using RcsLite instead of RcsWrap

If RcsLite works try it on CairoRelease

If RcsLite doesn't solve your ultimate problem then I imagine you'll have to modify RcsWrap.pm to prefix a string to make the username palettable.

-- MartinCleaver - 03 Nov 2005

Thanks Martin! Changing TWiki to use RcsLite fixed the problem. Thanks all for your contributions.

-- JovPangestu - 03 Nov 2005

I wonder what RcsLite is contributing to the situation? Maybe it simply allows numeric usernames?

In DakarRelease, TWiki is using wikinames when invoking ci. However, if users are authenticated (i.e. have REMOTE_USER) but not registered (i.e. have no entry in TWikiUsers and no wikiname), then ci is invoked with the login name.

-- HaraldJoerg - 03 Nov 2005

Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2005-11-09 - JovPangestu
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.