Saturday, November 7, 2009

XgridLite and more on passwords



XgridLite is available here. It is a preference pane or plug-in for System Prefs.

We'll use it to change the passwords that the controller requires from the client and agent. The client-controller password is in:

/etc/xgrid/controller/client-password

I changed it to 'abcd' using XgridLite.



Let's see what we have:


sudo cp /etc/xgrid/controller/client-password ~/Desktop/clientpw


use the Finder getInfo to change permissions on the file.



run the pw.script.py from yesterday on it


         6   1   6   2   6   3   6   4
abcd: 01100001011000100110001101100100
key: 01111101100010010101001000100011
file: 00011100111010110011000101000111


That looks right. What's in the file is an XOR of the key and 'abcd'.


xgrid -h localhost -p abcd -job run /usr/bin/cal



   November 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30


It works! So, I guess I just screwed it when I tried it yesterday. Now, go back to XgridLite and change the agent-controller password to 'wxyz'.


sudo cp /etc/xgrid/controller/agent-password ~/Desktop/agentpw


change permissions and examine it:


         7   7   7   8   7   9   7   a
wxyz: 01110111011110000111100101111010
key: 01111101100010010101001000100011
file: 00001010111100010010101101011001


That looks right.


sudo xgridctl c status



daemon                  state                   pid                     
====== ===== ===
xgridcontrollerd running | enabled 1747


Different pid as expected, since we told XgridLite to restart the controller in order to make the password change effective:




xgrid -h localhost -p abcd -job run /usr/bin/cal


And it hangs... Go back to XgridLite and change the agent password back to 'mypw'. It still hangs...


sudo xgridctl c status



daemon                  state                   pid                     
====== ===== ===
xgridcontrollerd running | enabled 1935


Grab a text copy of the manual (without repeats of some characters---what is that about?)


man xgrid | col -bx > ~/Desktop/man.txt

xgrid -h localhost -p abcd -grid list



{
gridList = (
0
);
}



xgrid -h localhost -p abcd -grid attributes -gid 0



{
gridAttributes = {
gridMegahertz = 0;
isDefault = YES;
name = Xgrid;
};
}


That looks like we are hooked up properly...

Try cp:


sudo cp /etc/xgrid/agent/controller-password \
/etc/xgrid/controller/agent-password


And now it works.


xgrid -h localhost -p abcd -job run /usr/bin/cal



   November 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30


XgridLite is described as open-source. I'll have to grab a copy of the source and figure out what it's about. In any event, the most likely explanation seems to be that the controller should provide the agent-password to the agent, and it is either not doing that, or the agent is improperly using the password it requires, when it authenticates with the controller. Just a guess.

However, that doesn't explain why the reset using XgridLite failed. But perhaps I screwed up (<sigh> again).

2 comments:

charles said...

Maybe this post deserves an "Xgrid" label as well ;-)

Ed said...

XgridLite author here—I'll put investigating this on my to-do list. Other than spending a couple hours getting it to run on Leopard, I haven't touched the thing in years.

--Ed