Saturday, August 11, 2012

Pulling zWinUser and zWinPassword out of Zenoss ZopeDB

In my continuing saga of having to maintain a sparsely documented Zenoss instance.  I was trying to troubleshoot some WMI errors (that will be a later post), but I had no idea what the password was for the user we are using to pull this information from our various Windows servers.  And yes, I could have reset the password, but that may open a whole other can of worms that I didn't want to deal with.  So, using zendmd, which I mentioned previously, I used the following to pull zWinUser and zWinPassword:

$ zendmd
Welcome to the Zenoss dmd command shell!
'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands.
Use TAB-TAB to see a list of zendmd related commands.
Tab completion also works for objects -- hit tab after an object name and '.'
 (eg dmd. + tab-key).
>>> d = dmd.Devices.findDevice('')
>>> d.zWinUser,d.zWinPassword
('DOMAIN\\user', 'password')

Good luck and godspeed...

No comments:

Post a Comment