Update password via webpage

can we let the user to change their login password via a webpage with realtime? can we do this in asterisk ? What should i need to do in order to achieve this features?

Try to write a perl script and then reload asterisk.
system (“asterisk -rx reload”);

Anywhere to get this info?