Mombu the GNU Linux Forum sponsored links

Go Back   Mombu the GNU Linux Forum > GNU_Linux > Setuid root wont work
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 28th January 16:37
man_in_a_black_hat
External User
 
Posts: 1
Default Setuid root wont work



I have a script that uses iptables to forward ports, and I want users on
the system that dont have root access to be able to run this script and
forward ports to their systems (users need the same ports at different
times). This is all on a home network and I dont really want to hear about
security issues, I know it's not a good idea from a security standpoint.

Problem is when my script is run by a regular user with permissions 7777
(setuid set) and owned by root, it still says must be run as root. How do
I let other users run my script?
  Reply With Quote


  sponsored links


2 28th January 19:31
steve schreiber
External User
 
Posts: 1
Default Setuid root wont work



Hey,

I do not believe that setuid on scripts actually works, has to be a
binary. As for allowing regular users to run it, sudo is the way to do
that! Hope this helps!

S.
--
--> GNU/Linux is user friendly... it's just picky about its friends.
  Reply With Quote
3 28th January 19:31
man_in_a_black_hat
External User
 
Posts: 1
Default Setuid root wont work


Thanks for the reply... I managed to get it working by setting iptables
itself setuid root. I put a web interface on it, works just like a fancy
linksys router except its a 90mhz pentium in a 486 case.
  Reply With Quote
4 28th January 19:31
webmaster \(n.s\)
External User
 
Posts: 1
Default Setuid root wont work


sudo
  Reply With Quote
5 28th January 21:42
scott
External User
 
Posts: 1
Default Setuid root wont work


"Man_In_A_Black_Hat" <moviegirl@telusplanet.net> writes:


Don't use 7777. Use 1500. Make sure you use '-p' if you are using
ksh. E.g.

#!/bin/ksh -p
#
# setuid script. MUST NOT BE WRITABLE.
#
.... blah ...

scott
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666