Reset Cashier password via codeunit or sql script

Hello

We have Ls/retail

I want to reset a cashier password either by calling a codeunit or sql script directely on the database . When i directely modify sql table “Staff” password field and i commit table . The db changes revert to orginal state after ascessing the same cashier profile using Classic Menu access. I do not understand that

My overall plan is to write a webpage for which users can submit their username for password reset . The web page will call a code unit or a sql script and reset password to a random default value which will email to helpdesk cell phone with unqiue password . For which user will call to find out or forward to email by helpdesk .

I am familiar with sql and prefer use sql script .