Shell password change with PHP ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lecichy

    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 ? :)


  • John Downey

    #2
    Re: Shell password change with PHP ?

    lecichy wrote:[color=blue]
    > 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 ? :)
    >
    >[/color]
    Should take a look at http://www.php.net/proc_open

    Comment

    • Ian P. Christian

      #3
      Re: Shell password change with PHP ?

      lecichy wrote:
      [color=blue]
      > 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 ? :)[/color]

      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

      Comment

      Working...