Setup a password. But now when entering the password it says wrong password
Have you tried just pressing the return key when asked for a password? If there is no password set, OS X will still ask for a password to do some things, but still let you progress by pressing the return key without typing in the password.