Home » Infrastructure » Windows » Change Password (Visual Basic, 6.0, Windows)
Change Password [message #306967] Mon, 17 March 2008 06:41 Go to next message
visairam
Messages: 11
Registered: March 2008
Location: Bangalore
Junior Member
Hi,

My name is ram, Iam working as software engineer.

Currently iam working on an application having Oracle as backend and VB(Visual Basic) as front end.

The problem is :

1) When the password of an user expires(passes grace period) and user tries to login the system is throwing an error "Password expired". Error code is 28001.

2) When the user gets the temporary password from dba and tries to
login still it is throwing the same kind of error.
Error code is 28001.

But when i see other oracle tools, they are able to identify the temporary passwords and are prompting for change password, which iam not able to do from my application (VB).

How can i identify from my application that the password is temporary, as the oracle is throwing same error for both the cases(For expired password as well as for temporary password).


Please help me in this regards.

Thanks in advance.


Bye
Ram

Re: Change Password [message #306969 is a reply to message #306967] Mon, 17 March 2008 06:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You have to trap the 28001 error in your application and then raise a dialog box.
This is how work the other applications.

Regards
Michel
Re: Change Password [message #306976 is a reply to message #306969] Mon, 17 March 2008 07:16 Go to previous messageGo to next message
visairam
Messages: 11
Registered: March 2008
Location: Bangalore
Junior Member
Hi Michel,

Thanks for responding.

I can trap that error.

But the problem is, when the password actually expires then also, iam getting the same error from oracle.

There is a chance that i will show the dialog box prompting for the password change, when the password actually expires. I want the user to approach the dba for getting a temporary password.


Please understand the problem.

If it is not clear tell me.

Thanks you
Ram
Re: Change Password [message #306992 is a reply to message #306976] Mon, 17 March 2008 08:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
The user does not need a dba to change his password.
You can popup the box and let him change right when you get the 28001 error just like SQL*Plus does.

SYSTEM> drop user t;

User dropped.

SYSTEM> create user t identified by t password expire;

User created.

SYSTEM> grant create session to t;

Grant succeeded.

SYSTEM> connect t/t
ERROR:
ORA-28001: the password has expired

Changing password for t
New password:
Retype new password:
Password changed
Connected.
T> sho user
USER is "T"


Regards
Michel
Re: Change Password [message #307223 is a reply to message #306992] Tue, 18 March 2008 02:54 Go to previous messageGo to next message
visairam
Messages: 11
Registered: March 2008
Location: Bangalore
Junior Member
Hi Michel,

As per our application we want the user to approach the DBA to get the new password.

If the user tries to login with the expired password, i can show the dialog box asking for the change password. But, i want the DBA to generate the new temporary password for the user, whenever a password expires.



Thanks & Regards
Sairam Virella
Re: Change Password [message #307230 is a reply to message #307223] Tue, 18 March 2008 03:37 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
In this case, just trap the error and pop up an information box saying "your password has expired, contact your DBA"

Regards
Michel
Re: Change Password [message #307236 is a reply to message #307230] Tue, 18 March 2008 04:02 Go to previous messageGo to next message
visairam
Messages: 11
Registered: March 2008
Location: Bangalore
Junior Member
Hi Michael,

Hey please understand.

I can trap the error and show the dialog box as you said.

But, when the user gets the temporary password from the DBA and tries to login, still i get the same error as it is temporary password.
Re: Change Password [message #307245 is a reply to message #307236] Tue, 18 March 2008 04:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Then you are in deadlock unless your application can know this is a temporary password and not a regular one that is expired.
For instance, create a "user" table with something that can tell you that the current password is a temporary one.

Regards
Michel
Re: Change Password [message #307334 is a reply to message #307245] Tue, 18 March 2008 09:00 Go to previous messageGo to next message
visairam
Messages: 11
Registered: March 2008
Location: Bangalore
Junior Member
Hi Michael,

Please tell me how to set the expiry of the user to a certain period.


For instance, a given user should expire in next 1 hour.

Please tell me.

Thanks & Regards
Ram
Re: Change Password [message #307356 is a reply to message #307334] Tue, 18 March 2008 10:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You did not set it for a user but the profile associated to the user.
CREATE PROFILE/ALTER PROFILE see PASSWORD_LIFE_TIME.

Regards
Michel
Re: Change Password [message #307539 is a reply to message #307356] Wed, 19 March 2008 01:44 Go to previous message
visairam
Messages: 11
Registered: March 2008
Location: Bangalore
Junior Member
Hi Michael,

Thanks you.
Previous Topic: ODP.NET table dimensions don't 'alter'
Next Topic: Checking Oracle Instance
Goto Forum:
  


Current Time: Sun Dec 22 06:39:18 CST 2024