LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2019, 10:56 AM   #1
justjok
LQ Newbie
 
Registered: Jul 2019
Posts: 4

Rep: Reputation: Disabled
Angry Non-root user adding ip address to interface


I have an application running as non-root user that needs to be able to add an additional IP address (VIP) to a physical interface.

Is there any way to allow this user to do that without the use of sudo permissions? (application is not able to prepend sudo to the ip addr command today).

Any help will be appreciated.
 
Old 07-24-2019, 11:05 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,481

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Try this, create a script called ip further "up" that users path so that it'll get executed first and use that as a wrapper like:

Code:
#!/bin/bash

/path/to/sudo /real/path/to/ip $*
 
Old 07-24-2019, 04:44 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,998

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Might be possible to add this user to a group that can change permissions but less than root.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
config root user and non-root user in linux chuikingman Linux - Server 3 05-16-2015 02:32 AM
how can i write to a root:root 750 file with a non-root user? Droa Linux - Newbie 1 05-14-2012 07:49 PM
sudo non-user/non-root password Alex_Dc Linux - Security 3 02-19-2010 06:28 PM
How to change a process running in root-user to non-root user ???????????????????? narendra1310 Linux - Software 4 10-29-2009 02:11 AM
mounting hardrive via non-root and using it via non-root Paridoth Mandriva 1 11-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration