|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Network programming with Libnet and permissions.
Hello Everybody,
I'm starting to program using Libnet in my Linux system (RH 7.2). I can only initialize the network if looged as root. Is it compulsory or I can change some permissions to be able to do it as a regular user? I have an ethernet card. Thank you!!! |
|
#2
|
|||
|
|||
|
you can make the specific program suid-root.
that is: chown root.root <program> chmod 4777 <program> then you can start it as user but it will run with root permissions.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
Thanks for your reply. I should have imagined...
Is there a way to do it so you do not have to give root owness to the program? I mean, something like giving acces to write into the ethernet to some users different from root? I don't know if it's completely dumb or there is a way to do it. I'm not a Linux pro :-(. Thanks !! |
|
#4
|
|||
|
|||
|
no, this is not dump
![]() for most devices you have a "file" called eg. "/dev/hda". if you want raw access to the first harddisk, you chown this "file" to root.harddiskusers and chmod 770 - then any member of the group harddiskusers could access it in raw mode. afaik for ethernet devices there is no /dev/eth0 but the device is created some kind of dynamically. but no "file" exists for that. this is why you cannot have the above type of access to ethernet devices. a better solution than suid-root would be sudo. then you can restrict who is allowed to call the program as root and who not. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Network programming with Libnet and permissions. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|