470,849 Members | 1,036 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Shell password change with PHP ?

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
2 3062
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
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.

Similar topics

8 posts views Thread by Siemel Naran | last post: by
1 post views Thread by Brian Sadler | last post: by
4 posts views Thread by Andrew Chanter | last post: by
6 posts views Thread by ferg | last post: by
21 posts views Thread by Tom Gur | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.