• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Web Interface to change password

Can anyone show me how to write a program to change a Unix (Solaris) Password using web interface??
0
kachan
Asked:
kachan
  • 2
1 Solution
 
squimphCommented:
The easiest way seems to be to use Expect, a scripting language designed to talk to interactive programs like passwd. Using Expect to change passwords is a whole lot easier than writing an interface to PAM on Solaris.

In fact, in the Expect tarball is a demo CGI script and html form (passwd.html and passwd.cgi) that uses 'su' to change a user's password. It's very basic but works... and doesn't even need to be set UID to run.

Expect requires Tcl, another scripting language, but it can also be controlled via Perl and other languages.

Grab Expect from http://expect.nist.gov/

Beware that if your users are connecting across the Internet, a password change CGI should be run from an SSL web server to prevent outsiders from sniffing passwords when they are transmitted.
0
 
kachanAuthor Commented:
Your info is very helpful. BTW, I ran passwd to change password in solaris and it didn't ask me for the old password to confirm my identity... Is there anyway I can do that?
0
 
inkumcCommented:
Kachan--
 you quote:
I ran passwd to change password in solaris and it didn't ask me for the old password to confirm my identity... Is there anyway I can do that?
--Yes it didn't asked you for the old passwd because you log on as as a root...so go ahead and change the passwd and everything should go ok for you.
0
 
kachanAuthor Commented:
Many Thanks for your comments. That's exactly what I need. Thanks again!
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now