File_Passwd_Unix::changePasswd()

File_Passwd_Unix::changePasswd() -- Change password

Synopsis

mixed File_Passwd_Unix::changePasswd (string $user, string $pass)

Description

Change the password of a certain user.

Parameter

string $user

the user whose password should be changed

string $pass

the new plaintext password

Return value

Returns TRUE on success, PEAR_Error on failure.

Table 37-1. Possible PEAR_Error values

Error CodeSummary
FILE_PASSWD_E_EXISTS_NOTuser doesn't exist
FILE_PASSWD_INVALID_ENC_MODEactual encryption mode is not supported
FILE_PASSWD_UNDEFINEDif passwd file is shadowed

Note

This function can not be called statically.