Trusted(?) Password Maint With EXPECT

From: George Guethlein <GGuethlein_at_GiantOfMaryland.com>
Date: Thu, 12 Feb 1998 08:43:17 -0500

I need to allow "trusted" users to perform password maintenance on my
AlphaServers (running DUnix 3.2C,F & 4.0,B,D). It's a 24x7 application
and I would like to sleep at some point in my life !

Any thoughts or ideas on my following strategy would be GREATLY
appreciated, AS WELL AS ANY ALTERNATIVES. I will summarize.

I am trying to use Expect in this scenario, as follows :
1.) Trusted users ".profile" executes a kornshell menu script.
2.) Option 1 of menu allows password maintenance. User provides
USERID for password change; NEW PASSWORD; NEW PASSWORD
AGAIN for verification.
3.) Expect script "TMSpassmnt" (basically the "autopasswd" example) is
executed.

I have set the permissions/ownership on "TMSpassmnt" to
7755/root:system. My thinking is that the expect script will run as root
and allow the password to be changed without being asked for the
OLD password (the reason this process is needed - forgetful users
don't remember their password).

I encounter two errors :
1.) I am being asked for "Old password:", so it appears that the setUID
isn't working.
2.) I get error "send: invalid spawn id (4)" on the second send of
password.

I have attached the three files that represent the scenario steps above,
as well as the output from the execution of the process. You can see in
"exec3.doc" that I have tried many code features in the Expect script.

I have also posted the question to newsgroup "comp.lang.tcl", but
haven't had any takers on assistance. Based on previous experience, I
think I'll get a better response with this posting.

I Look forward to your replies.

Received on Thu Feb 12 1998 - 14:44:09 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT