resetPwd.py

resetPwd.py - Changes an Oracle account's password.

Purpose of This Script

Command-line utility for password management for an Oracle database helpdesk ("I forgot my password, can you reset it?")

  • Enforces password rules of your choice
  • Attempts to help the user find the correct username even if the precise spelling is not known
  • Accepts AS SYSDBA/AS SYSOPER logins.

Installation

If installed with sqlWrap, the sqlWrap installer automatically puts resetPwd.py into your Python Scripts directory: https://sourceforge.net/projects/sqlwrappy/

resetPwd.py is a free-standing script, however, and may be copied independently and run from anywhere. You can copy it directly from http://sqlwrappy.sourceforge.net/resetPwd.py

resetPwd.py requires that cx_Oracle be installed:

cx_Oracle: http://www.cxtools.net/default.aspx?nav=cxorlb

How To Use This Script

At the command prompt, run python resetPwd.py

You will be prompted for username, password, and database name. The database name should be available in your TNSNAMES.ORA file - resetPwd.py has not been tested with Oracle Easy Connect.

A standard set of password compliance rules is included within the script (search for ComplianceRules). To adapt them to your installation's rules, add appropriate functions to the script and append them to the ComplianceRules list.