1Answer

RBAC not working

8.8k Views
  • 15
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

RBAC not working

I`m learing RBAC in solaris.

bash-2.03# tail -4 /etc/user_attr
root::::type=normal;auths=solaris.*,solaris.grant;profiles=All
mirror::::type=normal;profiles=Mirror
jz::::type=normal;auths=solaris.*,solaris.grant;profiles=All
role1::::type=role;profile=p1

Check the 3th line. I modified the account jz accroding to root. So I expecting the account jz have the same power as root. But it do not have. May I know why? Any thing more need to do? Thanks for your help in advance

That's not how it works.

Judging from the format of your user_attr file it looks like you're using Solaris 11 (that is, it looks the same as my S11 and significantly different from my S10 installs). In Solaris 11 root is a role, not a user.

  • You should not be editing user_attr or any RBAC files directly.
  • The recommended way to elevate to root is with sudo (pfexec and pf-shells are deprecated).
  • The recommended way to modify roles and profiles is with usermod.

You'll need to add the profile Primary Administrator and the role root to the user jz:

usermod -P +"Primary Administrator" -R +root jz

You should remove the line you added manually before issuing that command. See usermod(1M) for more information.

  • 0
Reply Report
      • 1
    • Acctually, my os is solaris 8. And I checked the root. Its a user not a role. bash-2.03# grep root /etc/user_attr root::::type=normal;auths=solaris.*,solaris.grant;profiles=All`

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags