Solved

Web Interface to change password

Posted on 1998-11-25
4
179 Views
Last Modified: 2013-12-25
Can anyone show me how to write a program to change a Unix (Solaris) Password using web interface??
0
Comment
Question by:kachan
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
squimph earned 50 total points
ID: 1829787
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
 

Author Comment

by:kachan
ID: 1829788
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
 

Expert Comment

by:inkumc
ID: 1829789
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
 

Author Comment

by:kachan
ID: 1829790
Many Thanks for your comments. That's exactly what I need. Thanks again!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now