Hi Folks,
If you have netconf in the box, you can also pull same information via netconfig, dump it and run scripts based on the context check as above refered by AshvinO..
Sample RPC:
<rpc>
<get-config>
<source>
<running/>
</source>
<filter type="subtree">
<configuration>
<system>
<login>
<user>
<name>lab</name>
</user>
</login>
</system>
</configuration>
</filter>
</get-config>
</rpc>
]]>]]>