Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle 12c double quote on password restrictions

Tags:

oracle

sqlplus

I've been able to use any character on my passwords successfully using double quotes like:

alter user example identified by "weird/@#&'pass\\";

I haven't had any issues with special exceptions, even /0 \ and other special cases I've seen failed before work, but, I cannot use a double quote in my password ("), I've tried escape characters already with no success.

I see no restrictions on the Oracle Reference, so is there a way to use double quotes or is this an undocumented restriction?

like image 506
Andres Avatar asked Oct 24 '14 16:10

Andres


People also ask

How to use special characters in Oracle password?

Oracle recommends that you enclose parameter and value pairs in double quotation marks. These special characters must be escaped using double quotation marks (") around the special character or around the parameter value containing the special character.

What characters are allowed in Oracle password?

A password must begin with an alphabetic character. Passwords can contain only alphanumeric characters and the underscore (_), dollar sign ($), and pound sign (#). Password may NOT contain the "@" character. However, Oracle strongly discourages you from using $ and #.

What values are enclosed double quotes?

A character literal is always enclosed in double quotes.

What is the purpose of a password complexity policy in Oracle?

Oracle NoSQL Database checks if the new passwords are sufficiently complex to prevent attackers to break into the system.


1 Answers

You said,

but, I cannot use a double quote in my password ("), I've tried escape characters already with no success.

I see no restrictions on the Oracle Reference, so is there a way to use double quotes or is this an undocumented restriction?

Oracle has clearly documented the exception of the double quotation mark (") and the return character in the password. Quote from the documentation about IDENTIFIED BY clause,

Passwords can contain any single-byte, multibyte, or special characters, or any combination of these, from your database character set, with the exception of the double quotation mark (") and the return character.

So, you cannot use double quotation mark` in the password. You would get two types of error :

SQL> create user test identified by "hi"hi";
create user test identified by "hi"hi"
                                     *
ERROR at line 1:
ORA-01741: illegal zero-length identifier


SQL> create user test identified by "hi""hi";
create user test identified by "hi""hi"
                               *
ERROR at line 1:
ORA-03001: unimplemented feature


SQL>
like image 155
Lalit Kumar B Avatar answered Oct 07 '22 00:10

Lalit Kumar B