bjblackmore
asked on
Simple GUI for Oracle/SQLPlus Password Reset/Unlock
We have a lab system that uses Oracle as the backend database. Currently user account unlocks and password resets are done via 2nd line technicians, using the SQL*Plus commandline. We'd like to left-shift this process to service desk. However, we don't want them to have access to the commandline, as it could be dangerous if the wrong command is entered.
I'd like to know if anyone has already written a simple GUI that would allow user's accounts to be unlocked (ALTER USER “userid” ACCOUNT UNLOCK;) or passwords reset (ALTER USER “userid” IDENTIFIED BY password;).
If a GUI doesn't already exist, what would be required to create one? I have some experience with Visual Studio, so I'm thinking 3 Windows forms. The first/main form would be simple, 2 text boxes, username & password, and 2 buttons, unlock & reset (which would send the username/password along with 1 of the 2 commands above). There would be a menu at the top, login, connection settings, and exit. Exit is self explanitory. Login would open another form for the service desk analysts to login with their super user IDs. Connection settings would open a form to create/edit the oracle DB connection, or it would open the default Windows ODBC connection box, and allow you to create/edit a connection there.
I'd like to know if anyone has already written a simple GUI that would allow user's accounts to be unlocked (ALTER USER “userid” ACCOUNT UNLOCK;) or passwords reset (ALTER USER “userid” IDENTIFIED BY password;).
If a GUI doesn't already exist, what would be required to create one? I have some experience with Visual Studio, so I'm thinking 3 Windows forms. The first/main form would be simple, 2 text boxes, username & password, and 2 buttons, unlock & reset (which would send the username/password along with 1 of the 2 commands above). There would be a menu at the top, login, connection settings, and exit. Exit is self explanitory. Login would open another form for the service desk analysts to login with their super user IDs. Connection settings would open a form to create/edit the oracle DB connection, or it would open the default Windows ODBC connection box, and allow you to create/edit a connection there.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks for the reply. I didn't think about doing a stored procedure. I will forward this to the tech team, and see if they go for it! Sounds like the easiest option!
Regarding the GUI, I wasn't going to encode any username or password in the GUI itself. The login menu option would ask the service desk analyst for their username & password to login to oracle, so this would be user input and not stored. And the main form would be for the username & password of the end user being reset/unlocked, so again, the analyst would supply this during a raised service request.
Regarding the GUI, I wasn't going to encode any username or password in the GUI itself. The login menu option would ask the service desk analyst for their username & password to login to oracle, so this would be user input and not stored. And the main form would be for the username & password of the end user being reset/unlocked, so again, the analyst would supply this during a raised service request.
>>The login menu option would ask the service desk analyst for their username & password to login to oracle
If you give them a privileged username and password, what keeps them from using sqlplus or any other tool to connect to the database?
If you give them a privileged username and password, what keeps them from using sqlplus or any other tool to connect to the database?
ASKER
@sdstuber, thanks, I've not heard of Apex before. I assume you mean Oracle Application Express (https://apex.oracle.com/en/)? I've have a read of the site & details. It looks interesting. We use ServiceNow as an ITSM tool, so maybe we could build something in APEX and use it with in the ServiceNow tool?
if you use apex (which runs inside the database) you can use application ids instead of database ids.
that way the technicians won't have an oracle account at all
that way the technicians won't have an oracle account at all
Yes, you can use apex (application express) with servicenow. We use servicenow where I work as well.
there's nothing special about the servicenow/apex relationship; but if you have a local db install (as opposed to their cloud installation) then it's fairly easy to build queries that read their tables to generate your own reports or other features.
there's nothing special about the servicenow/apex relationship; but if you have a local db install (as opposed to their cloud installation) then it's fairly easy to build queries that read their tables to generate your own reports or other features.
unlock_account(p_username in varchar2)
reset_password(p_username in varchar2, p_password in varchar2)
The nice thing about the procedure is you can add checks in there to make sure they don't reset SYS or SYSTEM passwords or any other accounts they shouldn't.