Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

****************I am authoring a Book on Oracle Database Cloud Services.......More details to follow.***************

Title : Oracle Database Cloud Revealed
Publisher : Apress
Release Date : June-2018

**********************************************************************************


Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]


I am certified Oracle Cloud Architect:
Oracle Cloud Infrastructure 2018 Certified Architect Associate
Oracle Cloud Infrastructure Classic 2018 Certified Architect Associate

Search This Blog

Wednesday, July 6, 2011

Change apps user password

To change R12 apps user password via forms:

security->define->search>username

change the password here:

if it is greyed out then check whether the system profile is set to disabled:
"Application SSO LDAP Synchronization" enable this and you should be able to change the password via forms.

if not you can also use the below procedure:

SQL> exec apps.fnd_user_pkg.updateuser('TEST','welcome123');

PL/SQL procedure successfully completed.

or

begin
fnd_user_pkg.updateuser(x_user_name => 'TEST',x_owner => 'TEST',x_unencrypted_password => 'welcome123');
dbms_output.put_line('updateuser: ' || sqlerrm);
commit;
end;
/

or

for all the users:


set serveroutput on
declare
b_OK boolean;

CURSOR C1 IS
SELECT user_name
FROM apps.fnd_user
WHERE substr(user_name,1,1) in ('A','B','C','D')
AND substr(user_name,2,1) in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
AND substr(user_name,3,1) in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
AND substr(user_name,4,1) in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
AND substr(user_name,5,1) in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
AND substr(user_name,6,1) in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
-- AND USER_NAME = 'E131492'
ORDER by user_name desc;
begin
For l_username IN C1 LOOP
b_OK:=apps.fnd_user_pkg.changepassword(l_username.user_name,'TEST123');
if (b_OK) then
update apps.fnd_user set user_guid='' where user_name = l_username.user_name;
commit;
dbms_output.put_line('Password reset');
else
dbms_output.put_line('Password could not be reset');
end if;
end loop;
exception
when others then
dbms_output.put_line(sqlerrm);
end;


or

You can change the cursor to something like:-
============================
 CURSOR C1 IS
select user_name from apps.fnd_user
 where end_date is null and user_name not in ('APPS','SYSADMIN')
ORDER by user_name desc;

 

No comments: