On Mon, Jun 21, 2004 at 11:46:39AM +0530, John Varghese wrote: > Hello all > I am using Linux 7.2 and j2sdk1.4.1 > > I would like to use JNI to perform some root-priviledged tasks > say like adding users to system, restarting some daemons,....
Hello John, What exactly are you trying to do? Perform privileged tasks from an application that isn't running as root, or write Java applications that will run as root? If you're trying to get a single JNI method-call to be root for the duration of a call from a non-privileged program - it can't be done. Linux authorization doesn't work that way. Instead, you need to invoke an external process (such as through Runtime.exec()) that will run as root. You might read up on "sudo", which gives you a way grant such privileges to individual users in a well-controlled way. Nathan ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]