1. An electronic device comprising: an external storage device connection part connecting an external storage device capable of being locked by a password; a password retention part retaining password information including the password of the external storage device; a user authentication key retention part retaining a user authentication key of the electronic device; an input part for inputting data; a user authentication key determination part determining whether or not a user authentication key of the electronic device inputted by the input part and the user authentication key retained in the user authentication key retention part match with each other; and an output change part outputting the password information or changing the password of the external storage device which is set in the external storage device when the user authentication keys match with each other as a result of the determination by the user authentication key determination part, wherein the password retention part associates identification information on the external storage device with the password thereof and retains them as the password information.