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

RE : RE : how to generate passwords?



The shell_exec method will be alright for now, all I need is a way so
user can change their password themselves without too much trouble so I
can work on other things. Using the smbpasswd command with the -s switch
looks like a good idea I'll try to work on it tomorrow. I'll use the -U
switch so I can specify the user I want it to change the password.
Thanks a lot that should do what I need to do for now. I'll try to make
it more secure and stuff when I'll have more time.

Jean-Rene Cormier
 

-----Message d'origine-----
De : owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org] De la part de Adam
Williams6
Envoyé : 19 mars, 2002 16:35
À : Jean-Rene Cormier
Cc : 'Umesha Balasubramaniam'; openldap-software@OpenLDAP.org
Objet : 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
-----------------------------------------------------------