• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using JAAS UnixLoginModule to login as root on Linux  RSS feed

 
Matthew Shalorne
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running an app on a Linux box where I am already logged in. I want to spawn a process that needs to run as root. I have tried to use UnixLoginModule to login as root :

but my callback handler that would supply the password is never called and I don't appear to be logged in as root. It looks like UnixLoginModule simply returns data about the current user which is a fat lot of good. Does anyone know what I can do to make this thing do what it is supposed to do and allow me to perform a login? If JAAS is inadequate is there another way to acheive this?

Regards,
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if your application only ever needs to run on this one machine, or a very few machines, then the canonical solution is sudo. if you need to do it in pure java, though, i'm afraid i can't help.
 
Nirmal Ranganathan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have had the same problem also. It just returns roots info and doesn't seem to be using the callbackhandler.

If you get a solution let me know

Nirmal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!