Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
suid ofzo!?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Dutch
View previous topic :: View next topic  
Author Message
wouzer
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2003
Posts: 88
Location: The Hague, The Netherlands

PostPosted: Sat Mar 15, 2003 11:44 pm    Post subject: suid ofzo!? Reply with quote

hai, ik wilde graag weten hoe je een suid (ofzo) zet op files.....

Ik heb een aantal commando's in een file gezet: iptables .... enz. en adsl-start enzo. Het punt is dat als ik die commando's wil runnen, ik eerst moet su-en. Hoe krijg ik het nou voor elkaar dat een normale user (wheel group) die commando's ook kan runnen?

Ik heb wel eens gelezen over een suid zetten op een file, maar ik weet niet hoe dat moet. Kan iemand me uit de brand (klein brandje) helpen?
_________________
It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt. (Mark Twain)
Back to top
View user's profile Send private message
wouzer
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2003
Posts: 88
Location: The Hague, The Netherlands

PostPosted: Sat Mar 15, 2003 11:46 pm    Post subject: Reply with quote

Of eigenlijk beter nog: Hoe kan ik er voor zorgen dat bij het opstarten mijn firewall aan gaat (iptables) en mijn adsl-start runt en dat voor het afsluiten mijn adsl-stop wordt aangeroepen?
_________________
It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt. (Mark Twain)
Back to top
View user's profile Send private message
biroed
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2002
Posts: 147
Location: Amsterdam

PostPosted: Sun Mar 16, 2003 8:18 am    Post subject: Reply with quote

Dat kan in /etc/conf.d/local.start (pad_naar_script), en je eigen script uitvoerbaar maken.
Back to top
View user's profile Send private message
garo
Bodhisattva
Bodhisattva


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Sun Mar 16, 2003 10:37 am    Post subject: Reply with quote

Om programma uit te voeren met de rechten van de eigenaar van het het bestand (SUID maken):
Code:
chmod u+s programma

Om programma uit te voeren met de rechten van de groep van het het bestand (SGID maken):
Code:
chmod g+s programma


Meer info is beschikbaar hier.
_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Sun Mar 16, 2003 10:53 am    Post subject: Reply with quote

Voor het starten van netwerk-scripts zou ik sudo gebruiken:

Adsl-start: emerge sudo, en edit met "visudo" het bestand zo dat allen in de groep "wheel" zonder passwords commando's kunnen starten (Visudo gebruikt een standaard editor. Deze wordt benoemd door: export EDITOR=nano (of wat je leuk vindt)).
Dus: sudo /usr/sbin/adsl-start.

Dit is een nogal grove methode (security).
Beter: <user> <machinenaam> = NOPASSWD: /usr/sbin/adsl-start, /usr/sbin/adsl-stop, /usr/sbin/adsl-status.
Waarbij je een (of meer) users op een machine toegang geeft tot de benodigde bestanden.

Het firewall script wil je iedere keer automatisch starten als je een verbinding hebt opgebouwd. Voeg hiervoor (lekker makkelijk) een link toe aan /etc/ppp/ip-up.
Back to top
View user's profile Send private message
wouzer
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2003
Posts: 88
Location: The Hague, The Netherlands

PostPosted: Sun Mar 16, 2003 10:54 am    Post subject: Reply with quote

Dank! Het werkt.
_________________
It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt. (Mark Twain)
Back to top
View user's profile Send private message
kamikaz3
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 187

PostPosted: Sun Mar 16, 2003 12:07 pm    Post subject: Reply with quote

ik heb een rc-script geschreven daar voor

en dan aan de default runlevel toegevoegd
Back to top
View user's profile Send private message
water
Guru
Guru


Joined: 19 Jun 2002
Posts: 387
Location: Zierikzee, The Netherlands

PostPosted: Mon Mar 17, 2003 6:21 am    Post subject: Reply with quote

kamikaz3 wrote:
ik heb een rc-script geschreven daar voor

en dan aan de default runlevel toegevoegd


Post hem even, dan hebben andere er misschien ook iets aan.
_________________
Groeten uit Holland
Back to top
View user's profile Send private message
kamikaz3
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 187

PostPosted: Mon Mar 17, 2003 8:22 am    Post subject: Reply with quote

het is niet meer dan wat er in de docs (rc-scripting guide) staat hoor, dat even lezen kan best handig zijn

bij depend zet je net
bij start /usr/sbin/adsl-start
bij stop /usr/sbin/adsl-stop
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Dutch All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum