Skip to content

Commit 32fd16a

Browse files
committed
Set up default password for APEX ADMIN user
1 parent 8653c81 commit 32fd16a

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

README.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,20 @@ For performance concern, you may want to disable the disk asynch IO:
3333
docker run -d -p 49161:1521 -e ORACLE_DISABLE_ASYNCH_IO=true wnameless/oracle-xe-11g
3434
```
3535

36-
For XDB user, run this:
36+
Enable XDB user with default password: xdb, run this:
3737
```
38-
docker run -d -p 49161:1521 -p 8080:8080 -e ORACLE_ENABLE_XDB=true wnameless/oracle-xe-11g
38+
docker run -d -p 49161:1521 -e ORACLE_ENABLE_XDB=true wnameless/oracle-xe-11g
3939
```
4040

41-
Check if localhost:8080 work
41+
For APEX user:
4242
```
43-
curl -XGET "http://localhost:8080"
44-
```
45-
You will show
46-
```
47-
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
48-
<HTML><HEAD>
49-
<TITLE>401 Unauthorized</TITLE>
50-
</HEAD><BODY><H1>Unauthorized</H1>
51-
</BODY></HTML>
43+
docker run -d -p 49161:1521 -p 8080:8080 wnameless/oracle-xe-11g
5244
```
5345

5446
```
55-
# Login http://localhost:8080 with following credential:
56-
username: XDB
57-
password: xdb
47+
# Login http://localhost:8080/apex/apex_admin with following credential:
48+
username: ADMIN
49+
password: admin
5850
```
5951

6052
By default, the password verification is disable(password never expired)<br/>

assets/apex-default-pwd.sql

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
alter session set current_schema = APEX_040000;
2+
3+
begin
4+
5+
wwv_flow_security.g_security_group_id := 10;
6+
wwv_flow_security.g_user := 'ADMIN';
7+
wwv_flow_security.g_import_in_progress := true;
8+
9+
for c1 in (select user_id
10+
from wwv_flow_fnd_user
11+
where security_group_id = wwv_flow_security.g_security_group_id
12+
and user_name = wwv_flow_security.g_user) loop
13+
14+
wwv_flow_fnd_user_api.edit_fnd_user(
15+
p_user_id => c1.user_id,
16+
p_user_name => wwv_flow_security.g_user,
17+
p_web_password => 'admin',
18+
p_new_password => 'admin');
19+
end loop;
20+
21+
wwv_flow_security.g_import_in_progress := false;
22+
23+
end;
24+
/
25+
commit;

assets/setup.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ echo 'export ORACLE_SID=XE' >> /etc/bash.bashrc &&
3232
mv /assets/startup.sh /usr/sbin/startup.sh &&
3333
chmod +x /usr/sbin/startup.sh &&
3434

35-
# Remove installation files
36-
rm -r /assets/ &&
37-
3835
# Create initialization script folders
3936
mkdir /docker-entrypoint-initdb.d
4037

@@ -46,5 +43,9 @@ export ORACLE_SID=XE
4643
echo "ALTER PROFILE DEFAULT LIMIT PASSWORD_VERIFY_FUNCTION NULL;" | sqlplus -s SYSTEM/oracle
4744
echo "alter profile DEFAULT limit password_life_time UNLIMITED;" | sqlplus -s SYSTEM/oracle
4845
echo "alter user SYSTEM identified by oracle account unlock;" | sqlplus -s SYSTEM/oracle
46+
cat /assets/apex-default-pwd.sql | sqlplus -s SYSTEM/oracle
47+
48+
# Remove installation files
49+
rm -r /assets/
4950

5051
exit $?

0 commit comments

Comments
 (0)