0

hi!

My boss told me that the script should DISPLAY ERROR if FAILED_LOGIN_ATTEMPTS is greater than 3... HOW should I do THis?
PLease talk to me like im moron, im just a beginner... or please give a sample code to do this.. thanx a lot...


HERE's THE SCRIPT:

export ORACLE_SID=ohkrm92
export ORAENV_ASK=NO
. oraenv

echo "
select * from dba_profiles
where resource_name in ('FAILED_LOGIN_ATTEMPTS ')
order by profile;
" > t2.sql

echo "@t2.sql" | sqlplus -s username/password

HERE'S THE OUTPUT:


PROFILE -------- RESOURCE_NAME -------- RESOURCE
DEFAULT -------- FAILED_LOGIN_ATTEMPTS -------- PASSWORD
3


HOW SHOULD I MAKE A SCRIPT THAT WOULD DISPLAY AN ERROR MESSAGE IF FAILED_LOGIN_ATTEMPTS is GREATER THAN 3...

PLEASE help...

thank you....

3
Contributors
2
Replies
4
Views
10 Years
Discussion Span
Last Post by sut
0

This is actually an Oracle question:
dba_profiles sets the rules for the system, not how many login failures there are for a given user.

Offhand I do not know what SYS table Oracle currently uses to store this information. Plus, this approach is an idea that is doomed to failure unless the dba does a

GRANT SELECT ON <whatever the underlying table is>  to PUBLIC;

which could very well be against most security policies.
Most tables relating to security are carefully protected.

0
echo "
set head off
select profile,limit from dba_profiles
   where resource_name = 'FAILED_LOGIN_ATTEMPTS';
" |sqlplus -S username/password |
while read profile limit ; do
    if [[ $limit = UNLIMITED ]] || [[ $limit -gt 3 ]] ; then
        echo "ERROR: $profile can attempt to login $limit times"
    fi
done
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.