There was something wrong inside the shellscript.sh . Everything was fine with the exec call :) .
Now it works as expected.
Question
What could be wrong here, so i get always the exitValue 125? :
function cPWinKerb(userPW,userUID)
{
try
{
var execStr = new Array("su","-c","/home/shellscript.sh",userPW,userUID);
var runtime = java.lang.Runtime.getRuntime();
var proc = runtime.exec(execStr);
var l="";
l = execStr + " --- " + l + "RESULT: [" + proc.waitFor() + " " + proc.exitValue() + "]";
return l;
}
catch (e)
{
return String(e);
}
finally
{
}
}
I get as result:
RESULT: [125 125]".
I tried different things:
I am running out of options to try.
If a call "su -c /home/shellscript.sh userPW userUID" from command promt it works fine.
Solution
There was something wrong inside the shellscript.sh . Everything was fine with the exec call :) .
Now it works as expected.