Dameng database login password strategy

Sometimes it is quite a headache to create a password for a user. Different platforms have different restrictions. The most common restrictions are length restrictions, complexity restrictions, and similarity restrictions. The Dameng database also has its own restrictions, which are determined by the parameter pwd_policy, and the default level is 2. This article will not discuss this parameter for the time being. This article mainly discusses how to log in when the password contains special characters under a LINUX-like platform.

First, verify the special characters dollar sign ($), backtick (`), escape character (\), exclamation point (!)

1. Dollar sign ($)

SQL> alter user sysdba identified by Sysdba$123;

Action performed

Elapsed time: 3.345(milliseconds). Execution number: 1001.

 disql SYSDBA/Sysdba$123

[-2501]: The username or password is incorrect.

disql V8

Username: ^C

disql SYSDBA/'Sysdba$123'

Server [LOCALHOST:5236]: in normal open state

Login usage time: 3.553(ms)

disql V8

The password setting of the dollar sign is relatively simple. To log in, you only need to use the password to log in.

2. Backtick (`), escape character (\), exclamation mark (!)

SQL> alter user sysdba identified by Sysdba`123;

SQL> alter user sysdba identified by Sysdba\123;

SQL> alter user sysdba identified by Sysdba!123;

Error [-2007] near [`] at line 1, column 71:

Syntax parsing error.

Elapsed time: 0.186(milliseconds). Execution number: 0.

These three special characters are not successful in the traditional setting, need to add "".

SQL> alter user sysdba identified by "Sysdba`123";

SQL> alter user sysdba identified by "Sysdba\123";

SQL> alter user sysdba identified by "Sysdba!123";

The same is true for their login, they only need to use the password to log in.

disql SYSDBA/'Sysdba`123'

disql SYSDBA/'Sysdba\123'

disql SYSDBA/'Sysdba!123'

Server [LOCALHOST:5236]: in normal open state

Login usage time: 3.838(ms)

disql V8

3. The special @, I believe many people like to add this symbol in the password.

SQL> alter user sysdba identified by "Sysdba@123";

Action performed

Elapsed time: 7.467(milliseconds). Execution number: 1000.

There are two ways to log in

disql 'SYSDBA/"Sysdba@123"'

disql SYSDBA/'"Sysdba@123"'

Server [LOCALHOST:5236]: in normal open state

Login usage time: 2.582(ms)

disql V8

4. The / symbol that conflicts with the login format

SQL> alter user sysdba identified by "aaaa/aaaa";

Action performed

Elapsed time: 3.737(milliseconds). Execution number: 1005.

disql SYSDBA/'aaaa/aaaa'

Usage: CONN[ECT] <logon>

<logon> 为::= {<username>[/<password>] | /}[@<connect_identifier>][<option>] [<os_auth>]

<connect_identifier>为[<svc_name> | host[:port] | <unixsocket_file>]

.......

It is obvious that using single quotes will not work here, you need to add double quotes and then single quotes to start

disql SYSDBA/'"aaaa/aaaa"'

Server [LOCALHOST:5236]: in normal open state

Login usage time: 5.169(ms)

5. Single quotation mark (')

SQL> alter user sysdba identified by "aaaa'aaaa";
The operation has been executed
. Elapsed time: 3.681 (milliseconds). Execution number: 1101.

disql SYSDBA/"aaaa'aaaa"

Server [LOCALHOST:5236]: in normal open state.
Login time: 3.386(ms)
disql V8

6. Double quotes (")

SQL> alter user SYSDBA identified by "aaaa""aaaa";

Operation executed.
Elapsed time: 4.128(milliseconds). Execution number: 1229.

At this time, the password of SYSDBA is actually aaaa"aaaa

disql SYSDBA/'"aaaa""aaaa"'

Server [LOCALHOST:5236]: in normal open state.
Login time: 2.822(ms)
disql V8

These are the more common special character passwords. Of course, there are some combinations of special characters (need to be translated). I won’t go into details here.

Community address: https://eco.dameng.com

Guess you like

Origin blog.csdn.net/duanpian_dba/article/details/126579656