用户管理

超级用户登录

用户管理

创建对象分配权限

Create user liucunzhi identified by root;

Grant resource to liucunzhi;

Grant connect to liucuzhi;

Connect liucunzhi/root;

 

 

为对象分配表的权限

对象权限分为 select update insert delete all

Grant select on emp to liucunzhi;

Select * from sys.emp;

Revoke select on emp from liucunzhi

 

可以继续传递权限的话

如果是对象权限 + with grant  option

如果 revoke 权限 liucunzhi 分配 出去的权限也被收回

grant all on emp to liucunzhi with grant option

liucunzhi 可以为其他的

如果是系统权限 with admin option

 

 

管理用户口令

使用 profile 管理用户口令

(1)       账户锁定指定用户锁定时间,指定用户输入密码出错的次数

注意:红色部分不能变 3 2

create profile 文件名   limit

failed_login_attempts 3 password_lock_time 2

2 )解锁: alter user liucunzhi2 account unlock

3 )终止命令为了让用户定期更改密码

SQL> create profile myprofile limit password_life_time 10 ;

配置文件已创建

SQL> alter user liucunzhi2 profile myprofile;

用户已更改。

 

口令历史

create profile myprofile limit password_life_time 10 password_reuse_time 10// 十天之后可重复用着个用户名

drop profile password_history[cascade]

 

发布了153 篇原创文章 · 获赞 2 · 访问量 2万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章