I would like to know 1st is this Possible and 2nd What code I need on the pages and where they reside in the path of the website (cgi-bin, homepage..)

If I have a webpage protected with a username and password and a registered person gains access, and the page they access contains a password box but I do not want the user to know the password that is being requested. Can a button be linked to a script that gets the unknown password I set, paste it and click login?

What type of script would it be and where would the page with the password I do not want the user to have access be located?