0

I need the user be able to change the IP address, without giving him full super user access. How can I do that?

I tried the solution here https://serverfault.com/a/480823 That works fine, but only once, then I have to redo these steps again.

How can I grant the user permission to change the IP address whenever he feels like to?

Edit: I did not rm the file, as outlined in the link above. But when I try it again, I get errors like

SIOCSIFADDR: Permission denied
SIOCSIFFLAGS: Permission denied
SIOCSIFNETMASK: Permission denied
SIOCSIFBROADCAST: Permission denied

just as if I used ifconfig directly.

  • The last step in that serverfault suggestion is to delete the modified ifconfig. If you avoided doing that you wouldn't need to repeat any of the earlier preparation steps. Would this be acceptable? – roaima Mar 18 '16 at 22:41
  • Does your distribution have a special group for network management? Add the user to the group? Or use sudo? – Andrew Miloradovsky Mar 18 '16 at 22:43
  • @roaima I did not use rm to remove the file. But it stops working for me. – pfnuesel Mar 18 '16 at 22:45
  • @AndrewMiloradovsky That is the solution that I'm looking for, but I don't know what group to use. – pfnuesel Mar 18 '16 at 22:46
  • You haven't told us what distribution you use, so we have no way of knowing that group (if any) you could add the user to. Please provide ud with complete in-and output from the command that work and the one that doesn't. – Henrik Mar 18 '16 at 23:05
0

If you skip the command rm ifconfig (last line in the solution you linked) you should be good to go. But leaving a command like ifconfig for a non-sysadmin to use all the time, unsupervised, is a security nightmare. He may not be malicious but if something happens and someone else gets hold of this account, well, you can guess the badlam they can cause. Just a word of caution.

  • Fix the the group and permissions. Or use sudo (without the capability) – roaima Mar 18 '16 at 22:44
  • I did not rm the file. I edited the question. – pfnuesel Mar 18 '16 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.