Page 1 of 1
Changing server password!
Posted: Mon Feb 21, 2005 8:12 pm
by Joe
Is it possible to change your servers password with PHP?. I thought about using passwd but it does not accept parameters
Joe
Posted: Mon Feb 21, 2005 8:36 pm
by Chris Corbyn
If it is possible you might be able to do it using something like (although I can't remember much unix)
Code: Select all
system('cha youruserid pass(newpassword)');
Or some other command line with the system() function
Posted: Mon Feb 21, 2005 8:46 pm
by timvw
yet another reason why i like to have all the user info (and credentials) in a ldap tree
so the answer is: it is possible to change the password, but you have to make sure you have the required privileges to do so. and those required privileges depend on where/how you save the credentials...
Posted: Mon Feb 21, 2005 9:04 pm
by Joe
Is cha a valid unix command?. As previously stated, I tried using the passwd command with specified parameters but it failed to work. Any suggestions?.