how to can a java prg run as root without launching it as root ?
2007-12-24 20:19:00
------=_NextPart_000_0014_01C10ACD.1BECC600
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello
A developer team is working on a java application that needs to bind to port
67 (we absolutely can't change it as it's constructor depend).
I know that only root can bind to port number lower than 1024 but I don't
want anybody in the developer team to know the root password !!
In other words: how can this prg run as root without launching it as root ?
Can 'sudo' or 'SUID bit' solve the problem given that this is a java program
?
The starting script looks like:
****************************************
#!/usr/local/bin/bash
CLASSPATH=/export/projects/toto/totoBackend/Sources:/export/projects/toto/to
toBackend/Libraries/xerces.jar...
export CLASSPATH
java com.imaginebroadband.BackendStarter
****************************************
Developers are waiting for me !!
Thank you in advance for any help.
Sabrina
------=_NextPart_000_0014_01C10ACD.1BECC600
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial>
<DIV><FONT size=3D2><SPAN =
class=3D682313915-11072001>Hello</SPAN></FONT></DIV>
<DIV><SPAN class=3D682313915-11072001></SPAN><FONT =
size=3D2> </FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D682313915-11072001>A developer team is =
working on=20
a java application that needs to bind to port 67 (we absolutely can't =
change=20
it as it's constructor depend).</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D682313915-11072001>I know that only =
root can bind=20
to port number lower than 1024 but I don't want anybody in the=20
developer team to know the root password !!</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2><SPAN class=3D682313915-11072001>In other words: =
how <SPAN=20
class=3D784561110-12072001>can this </SPAN>prg <SPAN=20
class=3D784561110-12072001>r</SPAN><SPAN class=3D784561110-12072001>un =
</SPAN>as=20
root without <SPAN class=3D784561110-12072001>launching it as =
</SPAN>root=20
?</SPAN></FONT></DIV>
<DIV><SPAN class=3D682313915-11072001></SPAN><FONT =
size=3D2> </FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D682313915-11072001>Can 'sudo' or 'SUID =
bit' solve=20
the problem given that this is a java program =
?</SPAN></FONT></DIV>
<DIV><SPAN class=3D682313915-11072001></SPAN><FONT =
size=3D2> </FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D682313915-11072001>The starting script =
looks=20
like:</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN=20
class=3D682313915-11072001>****************************************</SPAN=
></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2><SPAN=20
class=3D682313915-11072001>#!/usr/local/bin/bash</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DCourier size=3D2><SPAN=20
class=3D682313915-11072001>CLASSPATH=3D/export/projects/toto/totoBackend/=
Sources:/export/projects/toto/totoBackend/Libraries/xerces.jar...</SPAN><=
/FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DCourier><SPAN =
class=3D682313915-11072001>export=20
CLASSPATH<BR><STRONG>java=20
com.imaginebroadband.BackendStarter</STRONG></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><SPAN class=3D682313915-11072001><FONT =
face=3DArial=20
size=3D2><SPAN=20
class=3D682313915-11072001>****************************************</SPAN=
></FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial><SPAN =
class=3D682313915-11072001></SPAN></FONT><FONT=20
size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D682313915-11072001>Developers are=20
waiting for me !!</SPAN></FONT></DIV>
<DIV><FONT face=3DArial><SPAN =
class=3D682313915-11072001></SPAN></FONT><FONT=20
size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D682313915-11072001>Thank =
you in advance=20
for any help.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial><SPAN =
class=3D682313915-11072001></SPAN></FONT><FONT=20
face=3DArial><SPAN class=3D682313915-11072001></SPAN></FONT><FONT=20
size=3D2> </FONT></DIV><FONT face=3DArial>
<DIV><FONT color=3D#800080 face=3DVerdana size=3D2><SPAN=20
class=3D132162108-14032001>Sabrina</SPAN></FONT></DIV></FONT></FONT></DIV=
>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_0014_01C10ACD.1BECC600--
Comments
Got something to say?
You must be logged in to post a comment.

