expect

expect

Post by bria » Thu, 17 Oct 2002 23:17:26



how could i goabout using expect to automate resetting up users passwords, i
allready have a script that processes the user directories(and returns them
to a brand new state) but i would like to have the program reset the
passwords back to a "default"

this project is for students at my school that i am helping to teach a class
in, and will be helping to teach the class for next couple of years

 
 
 

expect

Post by Richard Cale » Thu, 17 Oct 2002 23:42:00



bamiang> how could i goabout using expect to automate resetting up users passwords, i
bamiang> allready have a script that processes the user directories(and returns them
bamiang> to a brand new state) but i would like to have the program reset the
bamiang> passwords back to a "default"

You might want to look at

        pw usermod USERNAME -w random

(I think that is the right syntax)

which sets USERNAME's password to something random and tells you what
it is.

--

                                                 |<

 
 
 

expect

Post by bria » Fri, 18 Oct 2002 02:57:33




group (bamiang) writes:

> bamiang> how could i goabout using expect to automate resetting up users
passwords, i
> bamiang> allready have a script that processes the user directories(and
returns them
> bamiang> to a brand new state) but i would like to have the program reset
the
> bamiang> passwords back to a "default"

> You might want to look at

>         pw usermod USERNAME -w random

> (I think that is the right syntax)

> which sets USERNAME's password to something random and tells you what
> it is.

> --

>                                                  |<

not quite what i was looking for i wanted to set a group of users passwords
to the same thing, but i might be able to bucher something up
 
 
 

1. Expect: expect vs. interact

Hey Don or any other expect person:

For comparable uses, which is faster, expect or interact, or is there
any difference?

By comparable, I mean:
    expect {
        -re .+ {
            send_user -raw -- $expect_out(buffer)
            exp_continue
        }
        -i $user_spawn_id -re .+ {
            send -- $expect_out(buffer)
            exp_continue
        }
    }

vs.

    interact

or (I know, slightly different semantics)

    expect {
        "crap" { exit }
        -re .+ {
            send_user -raw -- $expect_out(buffer)
            exp_continue
        }
        -i $user_spawn_id -re .+ {
            send -- $expect_out(buffer)
            exp_continue
        }
    }

vs.

    interact {
        "crap" { exit }
    }

--

http://www.ugcs.caltech.edu/~huyle

2. ld fails.

3. Expect/Tcl Problem - "scripts expect Tcl version..."

4. Bootable tape

5. expect and expecting it this way or this way...?

6. Weird Serial I/O problem

7. How to compile EXPECT was WANTED expect for Linux

8. Problem with busmastering ISA SCSI and > 16 MB memory?

9. expect for AIX where can I find freeware.expect.rte

10. expect-send pairs and sub expect-send pairs in chat

11. Expect: How to expect clear screen

12. Kermit and expect problems with 2.0

13. expect scripts and setting passwords