Re: Changing password remotely
Posted in 1997
Topics: Security, Permissions & Auditing, Platform-Specific Issues, Java & JDBC Development
If you look around some of the Sun ftp sites you can find the source code for the passwd command and alter it to do what you want. From what I remember the last time I needed to do this there wasn't any problems but I think the source was BSD and needed a little work to update the shadow files. No great hassle but time consuming. Reddy Duggempudi <reddy@gte.net> wrote in article <67m72v$rcl$1@gte2.gte.net>... > Hi, > > We have client server setup for our Informix New-Era based product. > Informix Server is running on AIX 4.1.4. Clients are comming from > AIX 4.1.4 and AIX 3.2.5. They do not have a login permission right > now. They are made trusted on the server. So, their password is not > required. > > In future we want to move our client to Java(unix, PC clients). Then > this trusted client thing would not work. All the users must type > their userid and password. Here is the question: > > "How can the user change his/her password from a client?" > > Is there a command line thing that I can run to change the password? > > I've tried writing an expect but it does nothing. No errors. It looks > like its doing something but nothing happens. > > Thanks for any input, > - Reddy > --------------------------------------------------- > #!/usr/local/bin/expect > spawn /usr/bin/passwd > expect { > "Old password:" { > send "oldpass\\r" > puts "Sent old password" > } > } > expect { > "New password:" { > send "newpass\\r" > puts "Sent new password" > } > } > > expect { > "new password again:" { > send "newpass\\r" > puts "Sent new password again" > } > } > > ---------------------------------------------------------- >