# LAN inventory

**URL:** <https://www.ruby-forum.com/t/lan-inventory/185502>\
**Category:** Ruby\
**Created:** [March 21, 2010, 8:20pm UTC](https://www.ruby-forum.com/t/lan-inventory/185502 "2010-03-21T20:20:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigthepaco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c67d28/32.png) [@bigthepaco](https://www.ruby-forum.com/u/bigthepaco)\
**Post date:** [March 21, 2010, 8:20pm UTC](https://www.ruby-forum.com/t/lan-inventory/185502/1 "2010-03-21T20:20:33Z")

</div>

Hi, I’ve a LAN with 1000 PC-clients (Windows 2000/XP and Linux) and  
I’d like monitor hardware and software: check hardware configuration,  
installed software, install and uninstall software remotely, change  
local password administrator, etc. I know a good application for this,  
OCSInventory, but I’d like develop myself to understand technology.  
I’m thinking to use SNMP and I’m considering Perl or Ruby language.  
Are there some examples in Ruby? Tutorials? Guides? Ruby with its  
libraries is ok for this type of application? Are there similar  
application Ruby developed? Can you help me?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![bigthepaco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c67d28/32.png) [@bigthepaco](https://www.ruby-forum.com/u/bigthepaco)\
**Post date:** [March 22, 2010, 12:25am UTC](https://www.ruby-forum.com/t/lan-inventory/185502/2 "2010-03-22T00:25:46Z")

</div>

On Sun, Mar 21, 2010 at 3:20 PM, bigthepaco [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi, I’ve a LAN with 1000 PC-clients (Windows 2000/XP and Linux) and  
> I’d like monitor hardware and software: check hardware configuration,  
> installed software, install and uninstall software remotely, change  
> local password administrator, etc. I know a good application for this,  
> OCSInventory, but I’d like develop myself to understand technology.  
> I’m thinking to use SNMP and I’m considering Perl or Ruby language.  
> Are there some examples in Ruby? Tutorials? Guides? Ruby with its  
> libraries is ok for this type of application?

I’ve not had an opportunity to use them, but Ruby does have libraries  
for SNMP and WMI:  
[http://snmplib.rubyforge.org/](http://snmplib.rubyforge.org/)  
[http://ruby-wmi.rubyforge.org/](http://ruby-wmi.rubyforge.org/)

I have use Ruby to collect information and make modifications to Linux  
systems over SSH:  
[http://net-ssh.rubyforge.org/](http://net-ssh.rubyforge.org/)

I have also used Puppet to maintain Linux systems (I’m not sure about  
Windows support there):  
[http://reductivelabs.com/products/puppet/](http://reductivelabs.com/products/puppet/)

There are also Ruby tools like Capistrano (I have used a little bit),  
Vlad (I have not used), and God (haven’t used, no Windows support):  
[http://www.capify.org/index.php/Capistrano](http://www.capify.org/index.php/Capistrano)  
[http://rubyhitsquad.com/Vlad\_the\_Deployer.html](http://rubyhitsquad.com/Vlad_the_Deployer.html)  
[http://god.rubyforge.org/](http://god.rubyforge.org/)

> Are there similar application Ruby developed?

Not open source:  
[http://www.spiceworks.com/](http://www.spiceworks.com/)  
[http://ruby.dzone.com/articles/spiceworks-becoming-force-it](http://ruby.dzone.com/articles/spiceworks-becoming-force-it)

---

<div class="post-metadata">

**Author:** ![bigthepaco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c67d28/32.png) [@bigthepaco](https://www.ruby-forum.com/u/bigthepaco)\
**Post date:** [March 24, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/lan-inventory/185502/3 "2010-03-24T16:38:38Z")

</div>

On 22 Mar, 00:22, removed\_email\_address@domain.invalid wrote:

> I’ve not had an opportunity to use them, but Ruby does have libraries
> 
> > Are there similar application Ruby developed?
> 
> Not open source:[http://www.spiceworks.com/http://ruby.dzone.com/articles/spiceworks-becoming-force-it](http://www.spiceworks.com/http://ruby.dzone.com/articles/spiceworks-becoming-force-it)

Ok, thank you. I try to simplify. Initially I’d like develop a script  
to change periodically all local administrator passwords of about 1000  
clients of my LAN (NT domain). I’d like to develop with a Linux box,  
but if it’s not possible ok, I can do it on Windows. Can I do it on  
Linux box? Is this a problem? Have you some script (examples) similar  
to this? Is a problem if I don’t know old passwords? Of course I’m LAN  
administrator and then I know domain password admin. I must decide  
about using Perl or Ruby. Perl has many modules for win32, Ruby I  
don’t know.  
Thank you very much

---

<div class="post-metadata">

**Author:** ![bigthepaco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c67d28/32.png) [@bigthepaco](https://www.ruby-forum.com/u/bigthepaco)\
**Post date:** [March 26, 2010, 10:22pm UTC](https://www.ruby-forum.com/t/lan-inventory/185502/4 "2010-03-26T22:22:06Z")

</div>

On Wed, Mar 24, 2010 at 11:35 AM, bigthepaco [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Ok, thank you. I try to simplify. Initially I’d like develop a script  
> to change periodically all local administrator passwords of about 1000  
> clients of my LAN (NT domain). I’d like to develop with a Linux box,  
> but if it’s not possible ok, I can do it on Windows. Can I do it on  
> Linux box? Is this a problem? Have you some script (examples) similar  
> to this? Is a problem if I don’t know old passwords? Of course I’m LAN  
> administrator and then I know domain password admin. I must decide  
> about using Perl or Ruby. Perl has many modules for win32, Ruby I  
> don’t know.

I don’t know if it works or not:

rpcclient -S nt\_server -W domain\_name -U username  
Password: \<your\_user’s\_password\>  
smb\> ntpass   
New Password (only once - get it right! :-): \<new\_user’s\_password\>  
smb\> quit

If the basic command works, it should be wrappable (with Ruby) to loop  
through a bunch of machines.
