-
warden
Hi to all, I wish to delegate to a friend the ability to run snoop or tcpdump on my server. I assigned it the "Network Manager" profile, but still tcpdump returns this error:
-
warden
"You don't have permission to perform this capture on that device (Attempt to open DLPI device failed with EACCES - root privilege may be required)"
-
warden
anyone can suggest me which permission/RBAC privilege should I assign to him in order to make it work?
-
tomww
pfexec snoop or pfexec tcpdump
-
warden
yes, but which RBAC profile is needed to let him capture network traffic?
-
tomww
maybe several ways to achieve this. you could sudo like enable running as root for the snoop or tcpdump tool.
-
tomww
or you could see for the needed network priviledges and alloe this. Just remember that changing the permissions might need re-logon for the user to get the permissions active.
-
tomww
the user could run "profiles -l" and see what is currently active.
-
warden
after a bit of research, I fount that it seems to be required the "raw_access" privilege, so I created a file '/etc/seciruty/prof_attr.d/custom' with this content:
-
warden
Network RAWaccess:::Allow direct access to network layer:privs=net_rawaccess;help=None.html
-
warden
then I refreshed the rbac service
-
warden
now the user, whom I assigned the "Network RAWaccess" profile to, is able to capture traffic! :) But I do not know if tis is the right way to use RBAC based permissions... it's ok?
-
tomww
you could try assigning net_observability
-
warden
Thanks, I’ll try ASAP (my client just crashed)… but the way I set the RBAC profile is the right one? I have very little experience with RBAC
-
tomww
you might go with using the tools to assing a role to the user instead of editing the files in /etc/security
-
tomww
for instance add a line to /etc/user_attr like this frank::::profiles=Network Observability
-
warden
ok, thanks. But assigning that account the existing profile "Network Observability" does not allow him to capture traffic. For this I thought it was necessary to define a new custom profile, which has the raw_access privilege
-
warden
Since my custom-defined profile did not show up in the "profile -l" output, I followed the example I found for the "Network Observability" profile. I wrote this in /etc/security/exec_attr.d/custom:
-
warden
Network Direct Access:solaris:cmd:::/usr/sbin/snoop:privs=net_rawaccess
-
warden
And this line in /etc/security/prof_attr/custom:
-
warden
Network Direct Access:::Allow direct access to network layer:privs=net_rawaccess;help=None.html
-
warden
then I issued "svcadm refresh rbac" and assigned the "Network Direct Access" profile to the user, which now is allowed to capture network traffic with this command:
-
warden
pfexec tcpdump -i [...]
-
warden