Skip to content

Commit c4a7126

Browse files
committed
Set key APEX and ORDS user passwords not to expire
1 parent 3b437fa commit c4a7126

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

scripts/setup/01-install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ else
4949
. $SCRIPT_DIR/package/installOrds.sh
5050
fi
5151

52+
# Post-installation Tasks for APEX and ORDS
53+
if [ $UID = "0" ]; then
54+
runuser oracle -m -s /bin/bash -c ". $SCRIPT_DIR/package/postInstallApexOrds.sh"
55+
else
56+
. $SCRIPT_DIR/package/postInstallApexOrds.sh
57+
fi
58+
5259
# Setup Oracle Wallet for APEX
5360
if [ $UID = "0" ]; then
5461
runuser oracle -m -s /bin/bash -c ". $SCRIPT_DIR/package/setupBaseWallet.sh"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
# Run as oracle user
4+
5+
ORAENV_ASK=NO
6+
ORACLE_SID=${ORACLE_SID:-XE}
7+
8+
. oraenv
9+
10+
cd $APEX_HOME
11+
12+
echo "Post-Installation Task for APEX and ORDS"
13+
sqlplus / as sysdba << EOF
14+
alter session set container = ${ORACLE_PDB:-XEPDB1};
15+
16+
-- Create profile APPLICATION_AGENT
17+
create profile application_agent limit
18+
cpu_per_session unlimited
19+
cpu_per_call unlimited
20+
connect_time unlimited
21+
idle_time unlimited
22+
sessions_per_user unlimited
23+
logical_reads_per_session unlimited
24+
logical_reads_per_call unlimited
25+
private_sga unlimited
26+
composite_limit unlimited
27+
password_life_time unlimited
28+
password_grace_time 7
29+
password_reuse_max unlimited
30+
password_reuse_time unlimited
31+
password_verify_function null
32+
failed_login_attempts 10
33+
password_lock_time 1
34+
;
35+
-- Assign relevant users so that their passwords do not expire
36+
alter user apex_public_user profile application_agent;
37+
alter user apex_rest_public_user profile application_agent;
38+
alter user apex_listener profile application_agent;
39+
alter user ords_public_user profile application_agent;
40+
EOF

0 commit comments

Comments
 (0)