Whoever Resembles a People is One of Them. He is not one of us who resembles other than us,
nor who resembles the Jews nor the Christians.(jami-at-tirmidhi-vol-5-ahadith-2695)
O you who believe (who wish to reach ALLAH C.C. before death)! Do not take my and
your enemies for friends!
And although they have denied what has come to you
from the Truth, you still love them (treating them as your friends).
If you go forth to struggle hard in My Way, seeking My Pleasure, (then why) you manifest
love to them and share with them your secrets.
And I know what you conceal and what you manifest. And whoever of you does that, then he
indeed has gone astray from the right Way. 60/Al-Mumtahanah-1
They are driving out the Messenger and yourselves from your land because you
believe in ALLAH C.C., your Lord.
Recite (read and explain to others) that which has been revealed to you of the Book
and keep up the Prayer.
Surely the Prayer keeps away from Al-Fahsh (to do what ALLAH C.C. prohibits) and Al-Munkar
(to deny what ALLAH C.C. commands).
Whoever obeys me, obeys ALLAH C.C., and whoever disobeys me, disobeys ALLAH C.C.
Whoever obeys the ruler, obeys me, and whoever disobeys the ruler, disobeys me. " (Sahih)

Administering User Security

User Management

Creating users

CREATE USER omer IDENTIFIED BY sifreniz
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON users;

Granting privileges

GRANT connect TO omer;
GRANT create table, create procedure TO omer;

Locking and Unlocking User Accounts

1 alter user user_name account lock;
alter user user_name account unlock;

Specifying passwords

alter user user_name identified by new_password;
ALTER USER user_name IDENTIFIED BY new_password ACCOUNT UNLOCK;

Configuring an account lock after several failed login attempts

ALTER PROFILE “DEFAULT” LIMIT FAILED_LOGIN_ATTEMPTS DEFAULT
ALTER PROFILE “DEFAULT” LIMIT FAILED_LOGIN_ATTEMPTS 9

Configuring the DBMS to end a user session after being idle for an amount of time in minutes.

ALTER PROFILE “DEFAULT” LIMIT IDLE_TIME 15 –(resource_limit = “False” by default, isn’t active until the value is set to “True”.)

Listing the users

set pages 999 lines 100
col username format a20
col status format a8
col tablespace format a20
col temp_ts format a20
select username
, account_status status
, created
, default_tablespace tablespace
, temporary_tablespace temp_ts
from dba_users
order by username

Roles

select *
from dba_roles
where role like ‘&role’

Granting roles to users

select grantee
, granted_role
, admin_option
from dba_role_privs
where grantee like upper(‘&username’) /

Privileges granted to specific roles

select privilege
, admin_option
from role_sys_privs
where role like ‘&role’

The table rights given to specific roles

 select owner || ‘.’ || table_name “TABLE”
, column_name
, privilege
, grantable
from role_tab_privs
where role like ‘&role’

The roles and privileges assigned to a specific user

SET SERVEROUTPUT ON
SET VERIFY OFF
SELECT a.granted_role “Role”,
a.admin_option “Adm”
FROM user_role_privs a;
 SELECT a.privilege “Privilege”,
a.admin_option “Adm”
FROM user_sys_privs a;

Copyright © 2015 Sysdba All Rights Reserved Web Designer