Inconsistent password policy when updating VM password

There are at least two ways to update your virtual machine’s password. One is using Azure Portal and the other one is going through your virtual machine and run PowerShell or Azure CLI to update.

The only thing that you might get surprised is inconsistent password policy between Azure Portal and inside your Azure CLI.

If you reset your password policy in Azure Portal, your password must meet password complexity policy. The easy-to-guest one like “123456” is NOT allowed.

However, if you go to your virtual machine, for example my RHEL and perform an Azure CLI to reset/update the password, the password complexity policy seems to have gone somewhere else

az vm user update -n {vm_name} -g {rg_name} -u ts -p 123456

The RUNNING output takes pretty long but the password change is in fact effective. You can just disconnect your session and reconnect with the newly updated password.

Happy Azure Password Policy!

This entry was posted in Security Automation and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *