GBase 8s 数据库内部用户权限

本文介绍了如何配置GBase 8s数据库内部用户的权限,包括设置USERMAPPING参数以允许使用内部用户,创建代理用户,为内部用户授权,并详细展示了不同用户对表的操作权限。内容涉及查看和修改配置,创建内部用户,以及权限验证等步骤。
摘要由CSDN通过智能技术生成

配置参数,允许使用数据库内部用户

参数USERMAPPING控制是否允许使用数据库内部用户。

当该参数为OFF时,不允许使用内部用户访问GBase 8s。

####################################################################
# USERMAPPING - Control access to GBase for users without operating
#               system accounts. 
####################################################################
# OFF   -   users without operating system accounts cannot use GBase
# BASIC -   users without operating system accounts can use GBase but
#           not as privileged users
# ADMIN -   users without operating system accounts can use GBase as
#           privileged users 
####################################################################

USERMAPPING     OFF

可以使用onstat -c查看配置文件中参数内容。可以使用onmode -wf命令,设置参数的值。

[gbasedbt@devsvr ~]$ onstat -c | grep USERMAPPING
Your evaluation license will expire on 2022-09-06 00:00:00
# USERMAPPING - Control access to GBase for users without operating
USERMAPPING OFF
[gbasedbt@devsvr ~]$ onmode -wf USERMAPPING=ADMIN
Your evaluation license will expire on 2022-09-06 00:00:00
Value of USERMAPPING has been changed to ADMIN.
[gbasedbt@devsvr ~]$ onstat -c | grep USERMAPPING
Your evaluation license will expire on 2022-09-06 00:00:00
# USERMAPPING - Control access to GBase for users without operating
USERMAPPING     ADMIN           
[gbasedbt@devsvr ~]$ 

配置代理

在root用户下,创建一个用户:user_agent,做为GBase 8s内部用户的代理用户。

[root@devsvr ~]# useradd user_agent
[root@devsvr ~]# passwd user_agent
Changing password for user user_agent.
New password: 
BAD PASSWORD: The password is a palindrome
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@devsvr ~]# 

在root用户下,在/etc/gbasedbt目录下,创建一个名称为allowed.surrogates的文件,并配置代理的用户和组。

[root@devsvr ~]# ls /etc/gbasedbt
ls: cannot access /etc/gbasedbt: No such file or directory
[root@devsvr ~]# mkdir /etc/gbasedbt
[root@devsvr ~]# chown root:gbasedbt /etc/gbasedbt
[root@devsvr ~]# touch /etc/gbasedbt/allowed.surrogates
[root@devsvr ~]# echo "users:
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值