recently I had reset my ubuntu password using the information provided here password reset
By this am changed successfully, but here my question is how can we get security with this. any one can able to reset our password without our knowledge
The process described in the answer you linked would require the attacker to have hands on the console and the ability to restart the machine to access GRUB Recovery Mode. If you can limit physical access to your machine to only people you trust, you should be home free.
If you can't, you may wish to reconsider your living situation or work environment.