By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,718 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,718 IT Pros & Developers. It's quick & easy.

Shell password change with PHP ?

P: n/a
Hello

Is it possible to change shell user password via www form ? I mean using
fsockopen, scrtipt would connect to server via SSH, provide current username
and password and then execute shell command "passwd" and eventually change
password and close connection.
Can it be done? Or maybe its possible in other way if this script is
executed on the same server where this intended user accaunt is located.
Or should I learn Perl ? :)
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
lecichy wrote:
Hello

Is it possible to change shell user password via www form ? I mean using
fsockopen, scrtipt would connect to server via SSH, provide current username
and password and then execute shell command "passwd" and eventually change
password and close connection.
Can it be done? Or maybe its possible in other way if this script is
executed on the same server where this intended user accaunt is located.
Or should I learn Perl ? :)

Should take a look at http://www.php.net/proc_open

Jul 17 '05 #2

P: n/a
lecichy wrote:
Hello

Is it possible to change shell user password via www form ? I mean using
fsockopen, scrtipt would connect to server via SSH, provide current
username and password and then execute shell command "passwd" and
eventually change password and close connection.
Can it be done? Or maybe its possible in other way if this script is
executed on the same server where this intended user accaunt is located.
Or should I learn Perl ? :)


Look into suid, or sudo, and yes, a perl script would be useful.

Do you know about nss-mysql ? Perhaps you might want to look into that too.

Kind Regards,

--
Ian P. Christian
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.