[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: RE : how to generate passwords?



>Thanks a lot that worked. Now I just need to find a way to create the
>Samba lmPassword and ntPassword...

I'm not certain how secure the shell_exec method is but if it is 
acceptable you could use the smbpasswd command with the -s switch which 
causes it to read stdin for old and new password.  Trouble is smbpasswd 
will change the password of the UID that smbpassword is running as unless 
you run it as **root** from your webscript (iiieeeeee!!!).  So you'll 
probably end up changing the CIFS password for "httpd" or "nobody".

>I’ve set up OpenLDAP to do user authentication for a server and now I’m
>trying to make a script so user could change their password from the web
>in PHP but I can generate the password using the crypt function in PHP
>and putting {crypt}whateverpassword  in the userPassword attribute and I
>can log in using SSH but I can’t bind using the script I made anymore…
>Anybody could help me with a way to generate passwords in PHP? And also
>how do you generate password for the lmPassword and ntPassword? Thanks
> 
>Jean-Rene Cormier
>$crypt_userpassword = shell_exec("/usr/sbin/slappasswd -h {crypt} -s
>$userpassword");

-- 
-----------------------------------------------------------
Ximian GNOME, Evolution, LTSP, and RedHat Linux + LVM & XFS
-----------------------------------------------------------