Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Simple GUI for Oracle/SQLPlus Password Reset/Unlock

Posted on 2016-07-20
10
Medium Priority
?
49 Views
Last Modified: 2016-08-19
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.
0
Comment
Question by:bjblackmore
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
10 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 41721085
Even with a GUI all I need to do is uncompile it and I get the username and password.

Besides that is way to complicated.

Create a stored procedure in a privileged account (not SYS or SYSTEM) that accepts two parameters.

Grant execute on that procedure and create session to your helpdesk user.
Create a synonym on the procedure for the helpdesk user.

Done.

All that user can do is connect and execute your stored procedure.

Let them use sqlplus.

If you want to be really nice, create a sql script file that prompts them for the info and executes the procedure.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 41721089
Maybe two procedures to keep things minimal and less coding.
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.
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1000 total points
ID: 41721104
if you want a gui, you could look into APEX - that way there would be no need to install anything on the client.  It would simply be a small web page hosted by the database itself.

building a simple one page app like this could be done fairly easily, would be secure and could fully leverage the pl/sql mentioned above.
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

Author Comment

by:bjblackmore
ID: 41721106
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.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 41721110
>>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?
0
 

Author Comment

by:bjblackmore
ID: 41721113
@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?
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 41721115
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
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 41721118
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.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Starting up a Project
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question