Password.h and keypad.h change pass sketch for Arduino
The logic of your function is garbled:


Function checkpasswd(): Most of the function is ok, but you don't need to send passwd2 through Serial, since it doesn't have anything to do with this function. You only use the variable for setting a new password. You can ditch this print statement.
Function changepasswd(): Here lies the problem. Most likely getKey() returns NO_KEY here, which is defined as the null character. So, when outputting it to Serial, you don't see anything there (The null character marks the end of a string in C/C++). You set the password to be the null character, which cannot every be inputted by the user. Also there lies another pitfall: The Arduino Playground Site for the Password library states for the set() function:


  Warning: The new password should be a global variable (not a local
  function variable) as this function copies a pointer to the new
  password into the library, not a copy of the password.



Since the key variable is only local, after the function the Password library has it's internal pointer pointing to a now freed memory space. At some other point in the program this space might be written again, effectively changing to password to something else.

And lastly the function does not contain any loop, so only 1 character will be inputted and the newly set password can only be 1 character long. The buffer variable passwd2 is of type char, so also only 1 character. What you really need there is a char [] (character array).

Here is a bit of code (not tested), that should implement this correctly:

char passwd2[6]=""; //global buffer for new password
                    // 6 bytes, because a C string has to end with the null character

void changepasswd(){
    for(byte i=0;i&lt;5;i++){
        char key = NO_KEY;
        while(key == NO_KEY || key=='*' || key=='#' || key=='D') key = keypad.getKey();
        passwd2[i] = key;
        delay(60);
    }
    passwd2[5] = '\0'; //ensure correct string ending
    passwd.set(passwd2);
}


Note the following points:


This implementation blocks the programs execution, until a full valid password has been typed. It will ignore all invalid characters, that you use for other purposes (#, * and D).
The passwd.set(passwd2) is actually only necessary the first time, we change the password, to let the Password object have a pointer to our buffer. After that we technically can change the password directly in the buffer, without calling the set() function. I included it here for readability and making the code a bit more fail prove (against wrong futher coding).
This is hardcoded to accept only 5-digit passwords. If you want passwords with arbitrary length, you can start programming from this basis.
Debouncing buttons with a simple delay() may be not enough at some point. But as I understand the source code of the Keypad library, it also includes code for debouncing, by only checking every 10ms for a changed button and returning NO_KEY everytime else.