You can write a C program with owner root and the setuid bit turned-on.
When the servlet executes it, it should run with root priviledge.
Of course, it 's not very secure and at least you 'll have to
code some kind of validation in order to only let your servlet
call it.
There 's another program in unix called "sudo" that let 's
non-root users execute root-only programs. I don 't use it
so I can 't tell you how exactly to configure it, but sure it 's
a more secure solution than the setuid program.
Last note: be carefull, there are some little differences
between different unix flavours.
Regards,
Martin
-----Original Message-----
From: PUB: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Lunes, 16 de Abril de 2001 11:11 a.m.
To: [EMAIL PROTECTED]
Subject: Re: add user to unix system use servlet
Not unless you run the serlvet container as an out-of-process
service with admin rights...not a very smart thing to do.
Cheers!
Mark
----- Original Message -----
From: "rod" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 16, 2001 4:46 AM
Subject: add user to unix system use servlet
> hi all,
> can servlet can add a user to a unix system, i have root
password but
> servlet run on nobody right of web server.
> pls help me.
> thanks alot
>
>
_________________________________________________________________
__________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html