Operating System - Linux
1829500 Members
2247 Online
109991 Solutions
New Discussion

Re: cgiwrap problems, is there an 8 character limit for usernames?

 
Dave Falloon
Trusted Contributor

cgiwrap problems, is there an 8 character limit for usernames?

Hi Guys,

Its been a while but I've run into a weird problem, I have a bunch of vhosts on a machine running:

-apache 1.3.20
-cgiwrap 3.7

The problem I have is that some users get the familiar error,"premature end of script headers" when they try to run cgi scripts via cgi-wrap. If I take their script and copy it to my own users (dave) virtual hosted cgi dir, I can run the script no problem, copy it back and chown it back to the other user "victorian" and it fails to run. When I run the cgiwrapd to debug it I get no output and no errors. I am just grasping at straws right now but I think it may be related to the number of chars in the username. I seem to recall an apache bug of the same type, perhaps cgiwrap has the same thing?

Anyways any help would be appreciated.

Dave
Clothes make the man, Naked people have little to no effect on society
8 REPLIES 8
Stuart Browne
Honored Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

What do you mod_redirect rules look like for the VWS's?

I've got users that are longer than 8chr's and don't have this issue, but using a newer apache (can't recall what version of cgiwrap I'm using off the top of my head).
One long-haired git at your service...
Dave Falloon
Trusted Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

I don't have much experience with mod_rewrite so I'll post the rules that have been defined by default:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^209.5.184.230(:80)?$
RewriteCond %{HTTP_HOST} !^secure.blacksun.ca(:80)?$ [NC]
RewriteRule ^/(.*) http://secure.blacksun.ca/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/.sites/70/site4/users/$1/web/$3


I hope this renders properly.

In case it doesn't heres an attachment text file.

thanks,

Dave
Clothes make the man, Naked people have little to no effect on society
Steven E. Protter
Exalted Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

I can't figure out why you think usernames may be an issue.

My Red Hat Linux Systems all universally ignore any characters in a username after character 8. Just a note in case you're concerned.

If I create a user called jerusalem (9 char) and then try and log on as that user its real name is jerusale

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dave Falloon
Trusted Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

So this is going to fry your melons out there guys ( it fried mine :) :

I started toying with usernames on this machine, created many many 9 character usernames.

The cgiwrap fails if the ninth character is any one of the following letters:

c, o, n, g, p, w

This is not a prank, and I am at a loss as to why that would happen.

Next thing I tried was a ten character user name that had the ninth character of the user name "o" and it too fails with the dreaded "premature end of script headers"

So I don't know where to go from here. What would cause something so arbitrary?

Thanks guys,

Dave
Clothes make the man, Naked people have little to no effect on society
Stuart Browne
Honored Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

If I had to hazard a guess, I'd say there's more mod rewrite stuff in one of your cnofiguration files, that you've not found.

One long-haired git at your service...
Elmar P. Kolkman
Honored Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

You might try to create a user with 9 character (or 10) username with a homedirectory that only consists of the first 8 characters of the username. That might work...

(Just a guess, but combining your problem with SEP's note, that might be it...)

Why it is only not allowing those characters, but allowing others, I don't understand. But on most unix systems usernames are limited or truncated after character 8, with some weird side effects... This might be one of them.
Every problem has at least one solution. Only some solutions are harder to find.
Dave Falloon
Trusted Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

Turns out the problem was the cgiwrapd code was releasing a variable and then calling it. Fixed the code and voila its working.

--Dave
Clothes make the man, Naked people have little to no effect on society
Dave Falloon
Trusted Contributor

Re: cgiwrap problems, is there an 8 character limit for usernames?

Woops didn't close this with the last comment.
Clothes make the man, Naked people have little to no effect on society