473,668 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

username length character limits?

Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.

-----------------------------
ANYONE have any ideas why?
-----------------------------

PG_VERSION says it's 7.3. I don't know how to find out any more accurately the subversion of that.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
12 5430
I now have tried an equal length name, and it logs in fine:

't012345678901_ web_user' with pword 'password' works fine.

The problem below is consistent. I can drop and recrate the user, and it always cannot be logged into using that name. I can successfully alter the user, so the system is finding it, I just can't authenticate into it.
Dennis Gearon wrote:
Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.

-----------------------------
ANYONE have any ideas why?
-----------------------------

PG_VERSION says it's 7.3. I don't know how to find out any more
accurately the subversion of that.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #2
another name that does not work is 'H1q2W3e4R5_web _user'.

It seems to not like many alternations between numbers and letters.

Dennis Gearon wrote:
Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.

-----------------------------
ANYONE have any ideas why?
-----------------------------

PG_VERSION says it's 7.3. I don't know how to find out any more
accurately the subversion of that.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #3
tried it with two underscores and short name:
H1q2W_web_user

with only one underscore and a long name:
H1q2W3e4R5t6Y7u 8Iweb_user

with only oneunderscore and a short name:
H1q2Wweb_user

with no underscore and a long name:
H1q2W3e4R5t6Y7u 8Iwebuser

with no underschore and a short name:
H1q2W3webuser

--------------------------------------------------------------------
NONE OF THESE NAMES WORK AS USER NAMES WITH THE PASSWORD 'password'.
--------------------------------------------------------------------

I have no idea why.

Where does it say what is the legal:

length
characters
character set (?)

for user names?

one underscore and a short name.

Dennis Gearon wrote:
Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.

-----------------------------
ANYONE have any ideas why?
-----------------------------

PG_VERSION says it's 7.3. I don't know how to find out any more accurately the subversion of that.


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 23 '05 #4
Stephan Szabo wrote:
On Sat, 3 Jul 2004, Dennis Gearon wrote:

Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.

Are you sure that you're not just running into a case problem
with case folded names (non-quoted names from sql statements) versus
non-case folded names (programs which treat their arguments as quoted like
psql).

I am putting the exact same string into both situations:

A/ creating the username
B/ trying to log in.

If the database is not going to respect case in one, it shouldn't respect case in the other, right?

Maybe because it's feeding the name to the MD5 library with case, but checking it without case later?

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #5

On Sat, 3 Jul 2004, Dennis Gearon wrote:
Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.


Are you sure that you're not just running into a case problem
with case folded names (non-quoted names from sql statements) versus
non-case folded names (programs which treat their arguments as quoted like
psql).

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #6
Dennis Gearon wrote:
another name that does not work is 'H1q2W3e4R5_web _user'.
Sounds like a quoting problem. In the meantime, read this:
http://www.fr.postgresql.org/docs/7....reporting.html

It seems to not like many alternations between numbers and letters.

Dennis Gearon wrote:
Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.

-----------------------------
ANYONE have any ideas why?
-----------------------------

PG_VERSION says it's 7.3. I don't know how to find out any more
accurately the subversion of that.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #7


On Sat, 3 Jul 2004, Dennis Gearon wrote:
Stephan Szabo wrote:
On Sat, 3 Jul 2004, Dennis Gearon wrote:

Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.

Are you sure that you're not just running into a case problem
with case folded names (non-quoted names from sql statements) versus
non-case folded names (programs which treat their arguments as quoted like
psql).

I am putting the exact same string into both situations:

A/ creating the username


How did you create the user. Did you use the shell script or a create
user statement from inside a session in the database?
B/ trying to log in.

If the database is not going to respect case in one, it shouldn't
respect case in the other, right?


IIRC, psql (and the createuser shell script and such) treat it as if you
had double quoted its argument because of the way shells handle quotes
which would necessitate something like '"FOO"' to use a quoted uppercase
name. So, if you say psql FOO -U BAR, you're saying log into database
"FOO" as user "BAR".
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #8
Stephan Szabo wrote:

On Sat, 3 Jul 2004, Dennis Gearon wrote:

Stephan Szabo wrote:
On Sat, 3 Jul 2004, Dennis Gearon wrote:

Please CC me:

If I create the user 'web_user'
with password 'password'
I can connect using 'psql' just fine.

If I create the user 'D1Khb2g5m7FGk_ web_user'
with password 'password'
I CANNOT connect using 'psql', I get authentication error.
Are you sure that you're not just running into a case problem
with case folded names (non-quoted names from sql statements) versus
non-case folded names (programs which treat their arguments as quoted like
psql).


I am putting the exact same string into both situations:

A/ creating the username

How did you create the user. Did you use the shell script or a create
user statement from inside a session in the database?

B/ trying to log in.

If the database is not going to respect case in one, it shouldn't
respect case in the other, right?

IIRC, psql (and the createuser shell script and such) treat it as if you
had double quoted its argument because of the way shells handle quotes
which would necessitate something like '"FOO"' to use a quoted uppercase
name. So, if you say psql FOO -U BAR, you're saying log into database
"FOO" as user "BAR".

I created the user from inside of a psql session.

And I cannot either connect from invoking a different psql session from the shell,
nor from PHP using it's compiled in c library for postgres.

It seems it's another gotcha with this database. I wouldn't have thought it would so difficult to insert upper(whatever was enterd) into the database, and validate it the same way.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #9

On Sat, 3 Jul 2004, Dennis Gearon wrote:
Stephan Szabo wrote:
IIRC, psql (and the createuser shell script and such) treat it as if you
had double quoted its argument because of the way shells handle quotes
which would necessitate something like '"FOO"' to use a quoted uppercase
name. So, if you say psql FOO -U BAR, you're saying log into database
"FOO" as user "BAR".

I created the user from inside of a psql session.

And I cannot either connect from invoking a different psql session from the shell,
nor from PHP using it's compiled in c library for postgres.

It seems it's another gotcha with this database. I wouldn't have thought
it would so difficult to insert upper(whatever was enterd) into the
database, and validate it the same way.


Create user Foo and Create user "Foo" are creating users with different
names. Since we want to allow both names to exist at the same time and for
you to refer to either, there needs to be a mechanism for doing so. I
don't know about PHP, but as I said above, psql does not treat its
arguments as normal identifiers (thus lowercasing them) because it was
decided to be simpler for people to refer to either user. For the former,
it is foo and the latter Foo.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4087
by: Gerry N | last post by:
My guestbook brekas down if the message is to long. The method is POST, can it still be limits in the length of the message? Gerry The code: <?php header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache");
4
6062
by: Lobang Trader | last post by:
Hi all, I am trying to create a username and a password class. I would like to know what are the RECOMMENDED minimum and maximum length for both fields? These fields will be something like this: private static final int DEFAULT_MINIMUM_LENGTH = ??????
4
29512
by: wing | last post by:
Hi all, I find a JavaScript that limits the field length in a textarea, but it is not completed. The script does not handle the copy and paste case. For example, says the textarea field length is limited to 5 and a 6-character length text is pasted, no event is triggered. (The script only handles onKeyPress and onKeyUp)
3
14651
by: Seong-Kook Shin | last post by:
C FAQ Q 13.2 says that sprintf() is guaranteed to work only for n <= 509: sprintf(dest, "%.*s", n, source); Does 509 appear in any C standard? If not, where it came from? I looked over C99 (ISO/IEC 9899:1999) but didn't find yet. If that limitation is old standard (perhaps ANSI?), does it limit the total length of the string that sprintf() would print, or just for one '%s'?
6
3576
by: Håkan | last post by:
Hi! I get HTTP/1.1 400 Bad Request when I try to access a aspx-page running on server 2003 SP1 from internet explorer 6 running on the same machine. Here is the URL I am using: ...
11
5920
by: =?Utf-8?B?VmxhZCBIcnlib2s=?= | last post by:
Using IIS7, Vista x64, ASP.NET 2.0. I am getting HTTP 400 "Bad Request" for the following URL: /HTTPVPNWebPortal/62ccc22e-069b-441e-b9f0-83b45e7f4f1e/UdVpnSGFuZGxlcnMvQ292ZXJBcnQuYXNoeD9DJTNhJTVjRG9jdW1lbnRzK2FuZCtTZXR0aW5ncyU1Y011c2hyb29tJTVjTXkrRG9jdW1lbnRzJTVjTXkrTXVzaWMlNWNGcmVuY2glNWNBbWVpbGUlNWNZYW5uK1RpZXJzZW4rLStMYStOb3llZS5tcDM=/SecureTunnel.axd Here's what makes difference: - URL length: As soon as I make this URL two chars...
4
8445
by: Alec MacLean | last post by:
Is anyone aware of a size limit imposed on the subject text when using the System.Net.Mail library? I'm getting problems of message not being recieved if the subject exceeds 15 chars. Thx
4
1542
by: Daryl Lee | last post by:
I am trying to locate all lines in a suite of files with quoted strings of particular lengths. A search pattern like r'".{15}"' finds 15-character strings very nicely. But I have some very long ones, and a pattern like r'".{272}"' fails miserably, even though I know I have at least one 272-character string. In the short term, I can resort to locating the character positions of the quotes, but this seemed like such an elegant solution I...
11
1927
by: lak | last post by:
Hello firends. I want to know what is the variable length in c. I K&R they stated that atleast 31 character. But I give 1 lakhs length to a variable, but my compiler doesn't say any error. It accepts it.Then what is the maximum length to a variable.?
0
8374
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8575
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.