[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Using expect.rb to change a user's password in UNIX

Daniel Berger

7/23/2007 3:51:00 AM



On Jul 22, 6:15 pm, "Victor Reyes" <victor.re...@gmail.com> wrote:
> Hello World,
>
> Today, I used a Korn Shell script and the UNIX version of expect to change a
> user password remotely.
> I would like to use the ruby.rb library to do the same.
> For instance, when you type, in UNIX,
>
> passwd username
> It comes back asking to enter the PW.
> Once you enter it, it comes back asking you to enter it again.
>
> How do I do this using the ruby expect.rb library?

I just went through this. You can use net-telnet (or net-ssh). See:

http://groups.google.com/group/ruby-talk-google/browse_frm/thread/96cabb08c34182c/77c0843d27e95dd3?lnk=gst&q=berger+password&rnum=1#77c084...

Regards,

Dan