Create new random password

Hi,
I use PHP and MySQL within Dreamweaver
I want my client to be able to generate a new random password
for a new member.
How should I do this?
Create a list of random passwords or
can I create it on the fly while registering a new member?
I don't want the new member to create his own password.
Thanks to all people contributing to this forum.
I learned a lot here allready.
I hope you can also help me out with this one.
Jos

> can I create it on the fly while registering a new
member?
That would be the best way.
I have used this to produce random, 8 character passwords
(the database part
is to make sure that they are unique) -
function randomkeys($length)
$pattern =
"234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for($i=0;$i<($length);$i++)
if(isset($key))
$key .= $pattern{rand(0,strlen($pattern)-1)};
else
$key = $pattern{rand(0,strlen($pattern)-1)};
return $key;
mysql_select_db($database_selectData, $selectData);
$query_rsPasswords = "SELECT contactPassword FROM
tblcontactdata";
$rsPasswords = mysql_query($query_rsPasswords, $selectData)
or
die(mysql_error());
$row_rsPasswords = mysql_fetch_assoc($rsPasswords);
$totalRows_rsPasswords = mysql_num_rows($rsPasswords);
$masterList=array();
$passwords=array();
$rsPasswordList = mysql_query("SELECT contactPassword FROM
tblcontactdata",$selectData)
or die(mysql_errno()." : ".mysql_error());
while ($rec = mysql_fetch_row($rsPasswordList)){
$passwords[] = $rec[0];
$unique = false;
while ($unique === false) {
$temp = randomkeys(8); // this is generating a random
8-character p/w
if(!in_array($temp, $passwords)) {
$newPassword = $temp;
$unique = true;
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"arnhemcs" <[email protected]> wrote in
message
news:[email protected]...
> Hi,
>
> I use PHP and MySQL within Dreamweaver
> I want my client to be able to generate a new random
password for a new
> member.
>
> How should I do this?
> Create a list of random passwords or
> can I create it on the fly while registering a new
member?
> I don't want the new member to create his own password.
>
>
>
>
> Thanks to all people contributing to this forum.
> I learned a lot here allready.
>
> I hope you can also help me out with this one.
>
> Jos
>

Similar Messages

  • Pages created a random password for my document on my iPad. I have no idea what it is and I can't open my document. HELP!!!

    Pages created a random password for my document on my iPad. I have no idea what it is and I can't open my document. HELP!!!

    How old is your son?
    Under the Spanner in Pages there is Set Password where you create a password with hint. You really have to deliberately dig this out to do it.
    Do you get a hint when you are asked for the password?
    The Password is very secure, if you can't remember what it is, you will have to recreate the document.
    Peter

  • After creating new accounts Password not accepted

    On my daughter's G3 iMac (10.4.5) I have always had it set up with one user that was auto-logged in. Today I am trying to add 2 more users but the login window is rejecting the passwords. The set up for the users goes fine, but when the users try to log in their password is not accepted and the box shakes (nice touch btw).
    My admin login still works fine. I also tried setting up those new accounts with no passwords, but they still get shaken off. Anyone have any ideas?
    To make sure this wasn't user error on my part, I successfully set-up similar accounts on my iBook and they worked fine.
    Thanks
    Ed
    iBook G4, Ruby iMac, PowerMac G4   Mac OS X (10.4.5)  

    sounds like a netinfo database issue to me. if you have applecare you could call to be sure. otherwise, you can rename your netinfo database (which has probably become corrupt) by booting to single user mode (apple+s on startup) and typing the following commands:
    mv /var/db/netinfo/local.nidb /var/db/netinfo/local.nidb.bad
    reboot
    once you do that, the setup assistant will launch on reboot and to be sure you don't lose any of your daughter's data, make her user name, shortname and password are the exact same as they are now. after you've logged back in as her user, go ahead and try to re-create the users again. it should work. if not, you may be looking at an archive or possibly erase and install.
    good luck! it may be a good idea to back everything up just in case!
    (reference kbase 107210, section III only...skip steps 3 & 4)
    20" iMac G5 (ALS)   Mac OS X (10.4.5)   2GB RAM, 400GB HD; iPod nano 4G (white)

  • Mac OSX 10.6.8 Cannot create new admin password. Have tried terminal. Password is lost or not recognized.

    Have tried terminal. Password is lost or not recognized. I have tried using advice I found online. There is no disk to reboot. If I try to hold the C key it doesn't have a downward arrow it's up. I tried Terminal, doesn't recognize any commands. I'm fed up and tried using 24/7 paying them and for nothing. I cannot upload Maverick, not enough memory. Any other suggestions? I have more downloaded materials I'll try later but this is driving me nuts.

    My camera is a 1Ds mk II..
    and for that one it says
    All versions tested. All versions tested. Supported only through Lightroom 4.1.
    however, it also says
    Windows XP, Vista, 7; Mac OS X 10.5 or 10.6
    which is plain wrong, because Canon never supported any drivers for Windows Vista or Win 7, not to speak of XP 64bit. (You cannot connect the camera via firewire, without the device drivers!)

  • Random Password Generator

    Hi everyone, I made this Password Generator that does what I want, but I'd like to extend its functionality. Right now it creates a random password from an array of letters and numbers.
    import java.io.*;
    import javax.swing.*;
    import java.util.*;
    *Version 0.1:
    *creates several random passwords using numbers,
    *uppercase and lowercase letters
    *Version 0.2:
    *add a save feature
    public class PasswordGeneratorV02
        public static void main(String[] args)
             * Define all variables and create all objects here
            // create the Number and Letter arrays
            Integer[] numberList = new Integer[10];
            String[] letterList = new String[12];
            //Variable to continue the while loop
            Boolean cont = true;
            //Scanner used to continue or not
            Scanner input = new Scanner(System.in);
            //Stores the user input
            String answer;
             * End variables
            //fill the letterList array
            //need to find a more efficient way to do this
            //and add all the letters of the alphabet
            letterList[0] = "a";
            letterList[1] = "F";
            letterList[2] = "c";
            letterList[3] = "R";
            letterList[4] = "y";
            letterList[5] = "O";
            letterList[6] = "p";
            letterList[7] = "W";
            letterList[8] = "q";
            letterList[9] = "n";
            letterList[10]= "E";
            letterList[11]= "w";
            // fill it with numbers 0-9
            for (int i=0; i < numberList.length; i++)
                numberList= i;
    // make both arrays lists so we can shuffle them
    List list = Arrays.asList(numberList);
    List list2 = Arrays.asList(letterList);
    //Start the output to user
    System.out.println("Welcome to the random password generator!");
    System.out.println("This program will create a random 20 character alphanumeric password.");
    System.out.println();
    //Shuffles the array contents then prints it out.
    while(cont == true)
    // shuffle the list
    Collections.shuffle(Arrays.asList(numberList));
    Collections.shuffle(Arrays.asList(letterList));
    // print out the shuffled array contents
    for (int i : numberList)
    System.out.print(i + letterList[i]);
    System.out.println();
    System.out.println("Press Enter for a new password. Q to quit.");
    answer = input.nextLine();
    //check to see if user wants to quit
    if(answer.equalsIgnoreCase("q"))
    cont = false;
    System.out.println("Goodbye...");
    }I would like to change/add two things.
    1st, I want to change the array of letters to include the full alphabet(lower and uppercase), with out having to type it in.
    2nd, I would like to add a save feature where the user types in "S" at the prompt and it will allow them to save the password as a text file.
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Ok well, I googled around and found something.
    The output now displays letters, but it no longer shuffles them around. For example:
    6A8B7C4D2E0F5G1H3I9J
    Every letter is just the next letter in the alphabet. How would I shuffle an array of chars?
    New code:
    import java.io.*;
    import javax.swing.*;
    import java.util.*;
    *Version 0.1:
    *creates several random passwords using numbers,
    *uppercase and lowercase letters
    *Version 0.2:
    *add a save feature
    public class PasswordGeneratorV02
        public static void main(String[] args)
             * Define all variables and create all objects here
            // create the Number and Letter arrays
            Integer[] numberList = new Integer[10];
            char[] letterList = "ABCDEFGHIJKLMNOPQRSTUWVXYZabcdefghijklmnpqrstuvwxyz".toCharArray();
            //Variable to continue the while loop
            Boolean cont = true;
            //Scanner used to continue or not
            Scanner input = new Scanner(System.in);
            //Stores the user input
            String answer;
             * End variables
            // fill it with numbers 0-9
            for (int i=0; i < numberList.length; i++)
                numberList= i;
    // make both arrays lists so we can shuffle them
    List list = Arrays.asList(numberList);
    List list2 = Arrays.asList(letterList);
    //Start the output to user
    System.out.println("Welcome to the random password generator!");
    System.out.println("This program will create a random 20 character alphanumeric password.");
    System.out.println();
    //Shuffles the array contents then prints it out.
    while(cont == true)
    // shuffle the list
    Collections.shuffle(Arrays.asList(numberList));
    Collections.shuffle(Arrays.asList(letterList));
    // print out the shuffled array contents
    for (int i=0;i<numberList.length;i++)
    System.out.print(numberList[i] + String.valueOf(letterList[i]));
    System.out.println();
    System.out.println("Press Enter for a new password. Q to quit.");
    answer = input.nextLine();
    //check to see if user wants to quit
    if(answer.equalsIgnoreCase("q"))
    cont = false;
    System.out.println("Goodbye...");

  • Random password generation

    Hi All,
    We have a link on login page "Forgot Password" ?
    As users clicks the link, idea is he goes to page that has emails address and submit button.
    As user enters his emails address and clicks submit, the mechanism gemerates a new password and sends it over to his email address.
    My question is, "I dont know how to generate that new random password."
    Is there a code around, that I can use ?
    thanks a lot,
    pp

    It's easy enough to generate a random password. Use a
    constant string containing your alphabet (different
    systems have different rules about what characters
    are allowed). Then us Random first to generate a
    suitable length, then to pick a character from your
    alphabet for each slot. If there are further rules
    (e.g. "must contain at least one digit") then check
    the password you've just generated and if it fails
    the test, simply try again.
    But this isn't a particularly good system. It allows
    anyone to harrass a user by changing their password
    if they can guess their user name.
    The approach I favour is to send the user a one-time
    click-thru URL in an e-mail which allows them to set
    their password to anything they chose. That needs a
    special table in some data base. You generate a
    random token which acts as a one-shot password on a
    special "change password" page. As soon as the click
    through has been used then the database entry is
    deleted so that the token is invalidated. You should
    also invalidate the token if they log on in the
    normal way.I agree that the 'forgot your password' feature is nasty. I mean, we are normally enjoined from saying "invalid user id" or "invalid password", we have to say "invalid user id / password combination" or something to that effect. But by providing the 'forgot your password' feature, it would be trivial to write a bot to see which sites provide this, determine a good page from a bad (e.g., valid user id) and then have an easier time brute-forcing the password. Sad.
    On the other hand, I know personally that many companies are concerned with phishing attacks on their customers. As such, they have a blanket policy prohibiting any URL that hits a secured page in any way.
    So, what to do? :^(
    - Saish

  • How to create a  procedure to  change randomly passwords

    Hello,
    I am trying to create a procedure to change randomly passwords for all users in a database. I need this after the database cloning. I have too many users to alter in a manual way...
    Is there any option to create a procedure which will fetch all users in a database and alter them by a random password?
    I was not able to find any clue.
    Could you help me?
    Thanks

    Welcome to the forum.
    change randomly passwords for all users in a database.All users? Including SYS/SYSTEM? I hope not...
    But you could use DBMS_RANDOM.STRING and ALL_USERS and dynamic SQL.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_random.htm#sthref4675
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2114.htm#REFRN20302
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/dynamic.htm#LNPLS01101
    (easy to find when you do a quick search from http://www.oracle.com/pls/db102/homepage or http://www.oracle.com/pls/db112/homepage)
    DBMS_RANDOM.STRING can give you a random password easily:
    select dbms_random.string('x', 10)
    from   dual
    connect by level <= 10;Zo you could do something like:
    begin
      for rec in ( select t.username
                   ,      dbms_random.string('x', 10) new_pass
                   from   all_users t
                  -- where  t.username not in (...)
                  -- or
                  -- where  t.username in (...)
      loop
        --execute immediate ' alter user '||rec.username||' identified by '||rec.new_pass;
        dbms_output.put_line ('New password for user '||rec.username||' = '||rec.new_pass);
      end loop;
    end;
    /You'll have to fill in the where-clause yourself/
    I also commented out the dynamic alter user statement, since I'm not sure if you really want to reset the pwd's for all users.
    Also, instead of using dbms_output.put_line to check the new passwords, you could insert them in a table or spool the output to a file.

  • When I attempt to send a text from the new iPad, a dialog box appears with the option to either sign in with Apple ID Password or Create New Account. I try signing in using my Apple ID password but IMessage informs me that email address cannot be verified

    When I attempt to send a text from the new iPad, a dialog box appears with the option to either sign in with Apple ID Password or Create New Account. I try signing in using my Apple ID password but IMessage informs me that email address cannot be verified because it is already in use ??? What am I doing wrong?

    settings -> iTunes & App Store
    click on apple ID listed there
    select Sign Out
    sign in with the proper account
    from then on, when the store ask for your password it should be with the correct ID

  • My friend gave me ipod touch with all his accounts, i created new accounts but when i went on the appstore and tried to update apps installed by him,i was asked his account's password! i dont know his password.how can i use my account to update apps?

    my friend gave me ipod touch with all his accounts, i created new accounts but when i went on the appstore and tried to update apps installed by him,i was asked his account's password! i dont know his password.how can i use my account to update apps?

    You can't.  Apps and really all content purchased/downloaded through one Apple ID is forever tied to that Apple ID.  In the case of Apps they will always request that Apple ID to update as they are licensed to that Apple ID.
    In reality, the Apps were licensed to that Apple ID by the developer.  And cannot simply be given away to you for you to use.
    He should have wiped the iPod clean so you could set it up for your use without any of his accounts or purchased content as you are not really licensed to any of those Apps.
    Your friend should have followed this support document before giving the iPod to you:
    What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support

  • When i bought this iMac i failed to register correctly and as i am trying to install a printer i need to do this when i am logging on. How can i create new password

    When i bought this iMac i failed to register correctly and as i am trying to install a printer i need to do this when i am logging on. How can i create new password

    See
    http://osxdaily.com/2011/08/24/reset-mac-os-x-10-7-lion-password/ and
    http://osxdaily.com/2011/09/19/change-password-mac-os-x-10-7-lion-without-knowin g-current-password/
    which also apply to Mtn Lion and Macericks.

  • HT201240 I forget my password and hint . How can I create new password ?

    I forget my password and hint in MacBook Air 11-inch mid 2012 . How can I create new password .

    Reset Password
    OS X 10.7 Lion /10.8 MountainLion
    Follow the instructions in the first and the third boxes.
    http://pondini.org/OSX/Password.html
    Note
    Keychain
    http://support.apple.com/kb/PH10623
    Best.

  • Creating NEW CLIENT,USER and PASSWORD Please

    Hi ..
    I am having this problem ,I am from SD-module. I am trying to work with sending and receiving IDOC's . Here i have problem with creating another logical system.could u please assist me in creating another client/user/password on my existed system.so that i can be able to send an idoc from one logical system to another logical system.i would appreciate your efforts.
    regards,
    SURIYA.

    Hi
    You can create a client using transaction code SCC4. Then you need to perform a client copy, use transcation SCCL to perform a local client copy from client 000 using SAP_ALL/SAP_CUST profile.
    Once you are done with you need to check whether the parameter login/no_automatic_user_sapstar is set to false (0). This can be achived in transaction code RZ10. You will have to restart the SAP server if the parameter value is altered(if not already 0).
    Once the parameter is set then u can login to the client using user SAP* and password "pass". For performing client copy u will log into the destination client that is the client newly created and using SCCL perform the client copy.
    Using BD54 u can create a logical system and in transaction SCC4 you can assign this logical system to the new client.
    Once you are done with client copy then DDIC user will also be there with the master password given during installation time.
    Using transaction SU01 you can create new users according to ur need and assign the roles/profiles as required.
    Once this is done you can peform the IDOC sending and recieveing activity in between those clients.
    If any more queries feel free to ask.
    Regards
    Sumit Jain
    [reward with points if the answer is useful]

  • Have updated email add now passwords don't work and old email is still displayed so created new apple ID and password ,now app store still using old email /password .wat to do now

    Have updated apple I D  and password
    Now appstores still using old apple Id and password
    Cannot update or download apps
    Created new apple I d and password and now still iTunes using old id and old password doesn't work
    Bbaaaaaaaahhhhhhh

    Hi Mofomon,
    If you want to use the new/updated AppleID and password, you need to sign out of the App Store, sign out of iTunes, etc. and then sign back on with the new ID and password.
    To sign out of the App Store on your iPad, go to Settings>iTunes & App Store, then click on your old AppleID, click on View Account, and sign in with your old password that goes with that ID. Then click on Sign Out. Once you have the old ID signed out, you can sign back on with the new ID and Password.
    New purchases will be done with that ID, but if you actually set up a totally separate brand new ID from your old one (as opposed to simply changing it) then any past purchases will still be linked to that old ID, and will require the old password for updating.
    If you simply changed your existing AppleID, then the new password will be what is needed for updating.
    Cheers,
    GB

  • When I enter my password to purchase a song, I need to create new security questions. Whenever I finish making thm and submit them, a box says "An error has occurred. We could not save your changes." How do I make it go away?

    When I enter my password to purchase a song, I need to create new security questions. When I finish writing them out and I hit submit, a box comes up with the words: "An error has occurred. We could not save your changes." What does that mean and how do I make it go away?

    Potentially the issue may be the combination of actual distance and the presence of any Wi-Fi interference at the location of the AirPort Express that may be the culprit here. The bottom line is you would want the Express to be within a 25+ dB range of the Extreme to be sure that it can consistently stay connected to it.
    For more details on proper base station placement, check out the following AirPort User tip. Please post back your results.

  • I am trying to create a new Apple password but Apple does not recognize my one and only email so stuck on a merry-go-round. Any suggestions?

    I am trying to create a new Apple password but Apple doe not recognize my one and only email address, so I'm stuck on this merry-go-round. Any suggestions?

    inabird
    you haven't told us what "Park" the "merry-go-round" is in
    tell us what actions you take to get Apple not to recognize your email address...
    Are you formatting it correctly? - username @ someDomain .com <- NO Spaces (I did it so the system wouldn't make an email link out of it)
    Tell us what happens when you realize  that Apple is "not recognizing" your email. What message do you get, exactly? Take screenshot of the entire screen for context
    ÇÇÇ

Maybe you are looking for

  • Voice dial does not confirm nor allow cancel

    When I use voice dial (usually via bluetooth headset on iPhone 3GS), if the iPhone decides it has found an exact match, it will notify me of the match and then start dialing.  It does not confirm the match with me, and when it starts dialing, the "Ca

  • Problem about getting report!

    Hi,all: I am trying to get Report which is the query result from the previous canvas, but I don't know how to do it. For example, I put a button called "get transcript" on one canvas, and I set this button's trigger to next block. However, I have no

  • Printing a Flash File to PDF

    I am an Educator and I use Flash almost exclusively to create graphic organizers for my students. I have Flash CS3 on my macbook, and just upgraded to Flash Pro CC. I am able to print a document sized Flash file (No aminations, etc) to a PDF file wit

  • Network settings keep resetting MTU to 1500

    I have recently upgraded to ML on a 2010 MBP I had the usual N-wifi connection problem* - even after 2 full-up installs, but finally solved it by setting the MTU to 1453 on both my router (Linksys) and in the network settings in MacOS But now, for so

  • Problem in creating Proforma invoice.......

    Hi, for one particular order & delivery item numbers 10, 20, 30 with each having 1.00 qty. Whenever we invoice it we are adding some batch items 11,21, 31. for these items qty is showing right as 0.00 qty. But whenever we create the proforma for the