Well i am working on a packaga manager for a new greek linux distro so i want my program to be run only by users that knows the root passward.Have you got any idea haw can i check the password;And how can i write a java program that runs with super user privilleges; If i will not find the answers for this problems i have to write the program with c++ and i will have to studt about one weak libraries about making gui so any help i precious
Once upon a time i was on the moon but it was so sad that made me to come back to earth
I would expect this to be a facility of the OS. You are going to need to use jni probably since most of linux is c. You can probalby open a shell within your program to execute commands from. it can be hidden from the user. You can change to super user in that shell and should be able to check from that shell if you have the super user as well.
Can you enforce the programm to be installed by root (perhaps by social practise - not technically) and make it executable-by-root only?
(since jars aren't native executable - (mhmm - sometimes they are) the read-access is critical here, not execute-access. btw: you're invited to the linux-forum.
Joined: Jul 09, 2005
I did not get any invitation mail but its ok i made an acount in www.linuxforum.com unless you ment something else. We r gonna made an application like yast of suse, so the platforma is gonna run only by root and so the jar files r gonna be read only by root and users that have root access. Probably i should try check suse to see thay did it with yast. Thanks again for your respond!!