Check user's password is valid or not in plsql

前端 未结 2 459
醉话见心
醉话见心 2021-01-27 16:48

I need to check if a database user is valid.

I will allow users to change their passwords using the ALTER command, but before I do I want to validate t

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-27 17:19

    Any database user can change its own password. This isn't something you can rule over. This is how it works "by design". Privileges for given user inside the database is another story. This is where you as the dba can rule.

    sys@XE> create user a identified by a;
    
    User created.
    
    Elapsed: 00:00:00.03
    sys@XE> grant create session to a;
    
    Grant succeeded.
    
    sys@XE> @c a/a
    
    a@XE> alter user a identified by b;
    
    User altered.
    
    Elapsed: 00:00:00.03
    a@XE> @c a/b
    a@XE>
    

    Your application tool will have to have a module for password management. Have a look at Tom's answer to this:

提交回复
热议问题