If it is a GSM device (one that uses a SIM card) then you can do a master reset via code:
Samsung Master Reset:
CAUTION: A "master reset" changes the phone settings back to default. This process will erase all contacts, downloaded settings, and downloaded applications (ringtones, wallpapers, graphics, etc). This process cannot be undone.
Enter *2767*3855# from the standby screen. (You may need to remove the SIM before it will allow you to type the code in)
reset code
reset password
dxjgjncf jjdsh dr jjeyruj tdxchdfhjuyd udtyudtyu
To reset the phone lock on the Samsung Galaxy s2 go to the settings section and select password options. then select password reset and enter your current password followed the password you would like to change it to.
Go onto the website or samsung dealer
karbonn k 21 reset password
master password yes
One can reset the password on a Samsung GT-C3053 easily if they know the original pass code to be able to change it. If one does not know the original passcode the phone will have to have a hard reset performed.
s5200 samsung mobile lock
0000
click on 'reset password' & follow the instructions
glx l668 reset code