Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 6th, 2002, 05:02 AM
ygdrasyl ygdrasyl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: BCN
Posts: 84 ygdrasyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 4 sec
Reputation Power: 7
Send a message via Yahoo to ygdrasyl
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!!!

Reply With Quote
  #2  
Old April 20th, 2002, 09:15 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
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.

Reply With Quote
  #3  
Old April 22nd, 2002, 08:56 AM
ygdrasyl ygdrasyl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: BCN
Posts: 84 ygdrasyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 4 sec
Reputation Power: 7
Send a message via Yahoo to ygdrasyl
Smile Thank you. More questions.

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 !!

Reply With Quote
  #4  
Old April 22nd, 2002, 12:26 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Network programming with Libnet and permissions.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway