azure-xplat-cli icon indicating copy to clipboard operation
azure-xplat-cli copied to clipboard

reset-access password with exclamation mark ! does not work

Open omartin2010 opened this issue 8 years ago • 4 comments

CLI Version: 0.10.5 OS Type: Win Installation via: win

Mode: AMR Environment: AzureCloud/Azure China Cloud/US Government/Blackforest/Azure Stack

Description: azure vm reset-access does not work if I put a ! in the password field. It's like if I input the password without the !.

Steps to reproduce:

  1. Run azure vm reset-access .... -p toto!

Error stack trace:

No error, but if you try login on the VM, you'll see that didn't work.

omartin2010 avatar Nov 07 '16 18:11 omartin2010

@omartin2010 , I'm thinking that ! is a special character in the command shell (windows) and it is likely not being passed into xplat-cli. So, the cli would have never passed it in to the backend systems.

If logging in with the same password you chose but without the ! (i.e, toto and not toto!) actually worked, then that confirms the theory.

The solution then, I think is that you need to escape special characters in your password text (with double quotes).

Finally, I suppose you'd see the same issue from bash shell as well.

See:

  1. http://stackoverflow.com/questions/10296162/escaping-special-characters-in-cmd
  2. http://unix.stackexchange.com/questions/33339/cant-use-exclamation-mark-in-bash

Let us know if that helped. Thanks.

balajikris avatar Nov 16 '16 01:11 balajikris

I recall trying this also on the Azure portal and it didn't work either... I'll give it a try and report.

omartin2010 avatar Nov 16 '16 01:11 omartin2010

@omartin2010 - Any update on this?

amarzavery avatar Jan 03 '17 23:01 amarzavery

Hi Amar, I didn’t try to repro it but I was told perhaps the ! was an escape character in cli… but I had tried if I recall with ! and \! but it’s been a while… Olivier

From: Amar Zavery [mailto:[email protected]] Sent: Tuesday, January 3, 2017 6:55 PM To: Azure/azure-xplat-cli [email protected] Cc: Olivier Martin [email protected]; Mention [email protected] Subject: Re: [Azure/azure-xplat-cli] reset-access password with exclamation mark ! does not work (#3304)

@omartin2010https://github.com/omartin2010 - Any update on this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-xplat-cli/issues/3304#issuecomment-270259388, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK2FXiBs89LSB5udW8c_dbbsUeqp6k-1ks5rOt_DgaJpZM4Krinp.

omartin2010 avatar Jan 04 '17 01:01 omartin2010