I know that the password of an account in geth can be changed using the command
geth account update on the geth console.
Do I have a similar function in solidity to change the account password which I can use in my smart contract?
No, this can not be done from solidity. This assumes that all the accounts are linked to nodes and this is not the case. Even if that were true, although the smart contract can get info of the node that mined the current block, this is not necessarily the node that generated the transaction. Furthermore, there is not a practical case in which a person will decide to make a transaction to change the password of his account.