3

I sense this should be a very simple question, but somehow I cannot find a solution.

I have a non-root user and I would like to grant this user enough permissions or privileges, so he can run ifconfig (I have root access to the machine).

For example:

ifconfig e1000g2 plumb
ifconfig e1000g2 inet 10.0.100.4

Right now I get this error:

ifconfig: cannot plumb e1000g2: Insufficient user authorizations

Note: I know that I should use ipadm and I do, but I am interested to this particular problem with ifconfig :)!

Vincenzo Pii
  • 147
  • 1
  • 6

1 Answers1

2

This is what sudo and pfexec were made for. =)

For sudo, you should run visudo -s and add an entry like this

myuser ALL=(ALL) /usr/sbin/ifconfig

Save and quit, and you're done. It's the easiest one of the two.

The more Solaris-y way is to use pfexec. It is more involved, but you can find directions for the process in this article: Custom Roles Using RBAC in the Solaris OS

For bite-sized chunks on the configuration of sudoers, I'd look here at the Sudoers entry in the Ubuntu Wiki.

Kassandry
  • 639
  • 1
  • 6
  • 15