1 Reply Latest reply on Oct 28, 2012 1:50 PM by Dude!

    ilom password change -- my script

      I am trying to prepare one expect script to change the ilom password but it is not working .please find the below script. actually it is stuck on "--> prompt .i think the bold line which i hv mentioned in the script is not correct , but not sure how to fix it

      #!/usr/bin/expect -f
      set timeout -1

      set load_fh [ open "hosts" r ]
      set ip_list [ split [read $load_fh] "\n" ]
      close $load_fh

      foreach ip $ip_list {

      if { $ip != ""} {
      spawn ssh -oStrictHostKeyChecking=no root@$ip
      expect "assword*" {send "<root password>@1\r"}
      *expect "'->'" {send "set /SP/users/root password=<new password>1\r"}*
      expect "assword*" {send "<new password>\r"}
      expect "'->'" {send "exit\r"}
      this is the below o/p when i run it.i think it is stuck on -> prompt

      [root@xxxxxxx abcd]# ./ilom2.expect
      spawn ssh -oStrictHostKeyChecking=no root@xxxxxx1-ilom

      Oracle(R) Integrated Lights Out Manager

      Version r65138

      Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.


      [root@xxxxxx abcd]#