Change linux password using php

From: Date: Fri, 05 Oct 2001 02:28:04 +0000
Subject: Change linux password using php
Groups: php.general 
Request: Send a blank email to php-general+get-70009@lists.php.net to get a copy of this message
What is the best way to change linux passwords using a web .PHP interface? I currently allow FTP access to php enabled webhosting sites; which use safe mode, thus use real linux accounts. Thus far I thought I would: Write a real short C program which would call allow to go setpasswd <username> <passwd> passwd could perhaps be the crypt() version to provide better security? it would just call passwd, and ensure that username is not 'root' and a few other accounts ;) Then I would put that program within the directory of executables allowed in safe mode. And just have a plain http post form to update the password, running over HTTPS. Does this seem a good plan ... or are there better? It also begs the question; how do I authenticate an account using php ... to login to their 'change password' feature? I have already spent alot of time trying to merge password files for different uses; Windows shares, Linux ones, for samba, and this and that, so it'd be nice to now have yet another passwd file :) Siggy -- Sigurd Magnusson Director www.totallydigital.co.nz

« previous php.general (#70009) next »