Solved

Web Interface to change password

Posted on 1998-11-25
4
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

732 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