unlock orcladmin password in shell script

Shell script to check if orcladmin account is locked, and unlock it if required

# Check to see if orcladmin account is locked, and unlock it if it is.
if [ "`ldapbind -p <myport> -D cn=orcladmin -w <myorcladminpassword>`" = "bind successful" ]
   echo orcladmin account is ok, is not locked.
   echo unlocking orcladmin account...
   oidpasswd connect=<mydatabase> unlock_su_acct=true <<END_PASSWD

Useful for running from cron for an environment where orcladmin repeatedly gets locked.

The -p port is optional depending on configuration.

If you don’t know the password of the ODS database user account, you can change it temporarily using this method.

Posted in Oracle forms, Scripts, Security

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>