Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Using expect.rb to change a user's password in UNIX
Bob Hutchison
7/23/2007 12:09:00 PM
Hi,
On 22-Jul-07, at 8:15 PM, Victor Reyes 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 don't know. I had to do something similar for scripting rsync over
ssh, and just used the unix version of expect (using popen4 and a
bash script I generated in Ruby). Very ugly, but expect usually is :-)
Cheers,
Bob
> We use this to change a userid on multiple systems at the same time.
>
> Thank you,
>
> Victor
----
Bob Hutchison -- tumblelog at http://
www.recursive.ca/so/
Recursive Design Inc. -- weblog at
http://www.rec...
hutch
http://www.rec...
-- works on
http://www.racon...
cms-for-static-content/home/
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Using expect.rb to change a user's password in UNIX
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password