![]() |
2008-10-04
, 02:16
|
|
Posts: 643 |
Thanked: 628 times |
Joined on Mar 2007
@ Seattle (or thereabouts)
|
#2
|
![]() |
2008-10-04
, 07:37
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#3
|
![]() |
2008-10-04
, 10:12
|
Posts: 9 |
Thanked: 1 time |
Joined on Dec 2007
|
#4
|
Nokia-N810-23-14:/home/user# ls -l /usr/bin/test -rwsr-xr-x 1 root 1000 7572 Oct 4 11:54 /usr/bin/test
![]() |
2008-10-07
, 09:56
|
Posts: 9 |
Thanked: 1 time |
Joined on Dec 2007
|
#5
|
I know this is damn stupid question but I can't find the answer. I'm currently working on a java program which needs to set up some network stuff via ifconfig. I don't want the whole VM to run as root so I thought about writing some smalls C programs calling system(ifconfig...); I could launch from Java via Runtime.getRuntime().getExcec(); to do whatever it needs to set up my interfaces.
To avoid asking for a root password or using rootsh (because it's incompatible to becomeroot which is a bit more popular I guess) I want the set Sticky Bits on my programs to give them root access when a normal user runs them.
The whole system works perfectly on my Desktop machine.
I just call chown root file to make root owner of the file and afterwards chmod +sx file as root to set sticky bit.
The following program returns "root" on my desktop but only user on my N810 (I don't know if Chinook or Diablo, is there a command to display it?) if I start it as a normal user on both systems.
toti