The documentation says the following: (page 17)
After the NSX Edge appliance has been deployed, you can change the password from the vSphere Web Client (Network & Security > NSX Edges > Select an Edge > Actions > Change CLI Credentials).
The standalone NSX Edge appliance uses different passwords to enter basic mode and privileged mode. When you deploy a standalone NSX Edge appliance from an OVF file you are prompted to configure both passwords. After the standalone NSX Edge appliance has been deployed, you can change the basic and privileged mode passwords with the password command.
I am able to update the credentials using WebClient. However I wanted to perform it via CLI but mentioned 'password' command throws error.
According to documentation you cannot do that.
It makes sense, because edges are deployed and managed by the nsx manager (via the vsphere-webclient)
Only on the standalone edge you can use the password command on cli. Because that is not managed by nsx.
The other way to do it is via api.
Thanks Chris for your input. It makes sense.