Forum Moderators: coopster

Message Too Old, No Replies

php to change a user's passwd

         

bomburmusicmallet

6:44 pm on May 10, 2006 (gmt 0)

10+ Year Member



Hi,

Is it possible to change a user's password to their account on a Unix server via a php script? Can I use php to invoke the passwd command?

If it is possible, is it advisable to NOT do this?

Here's what I'm trying to do. I am trying to automate our webmaster's ability to turn on and off ftp accounts by adding and removing passwords. Our webmaster is not a network manager, and it might be prudent to have an interface. I will manually add and remove the actual accounts on a regular basis, but without a password, the end user can't ftp. We want to be able to turn on and then off ftp for end users nearly instantly.

Thanks for any input.

siMKin

7:53 pm on May 10, 2006 (gmt 0)

10+ Year Member



[php.net...]

jatar_k

8:07 pm on May 10, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



just watch the permissions on this type of thing, you could be creating a massive security hole

well you actually are creating one, whether it is exploitable would depend

smoked1

4:21 am on May 12, 2006 (gmt 0)

10+ Year Member



I would avoid this if you can.