how to change credentials of virtual machine - azure

I want to change credentials of my virtual machine. First want to take backup,and then change username and password of virtualmachine (RDP). I'm not able to get settings in azure portal. Since our website is up and running, we don want to take risk, so need proper guidance.. Kindly guide me steps how to continue in azure portal.

You could select the particular VM on azure portal and goto Reset Password
Add the new username there and configure with the password

Related

When using an Azure VM, why am I getting "Cannot Find Certificate with thumbprint" when trying to reset admin password with VMAccessAgent?

I am trying to change the admin password for an Azure VM. I am not able to log on to the VM remotely.
What I've tried:
The password reset tool located in the Azure Portal for the VM
Set-AzVMAccessExtension via Powershell in the Azure Cloud Shell
Both return the following:
Failed to reset password
VM has reported a failure when processing extension 'VMAccessAgent'. Error message: "Parsing Extension protected settings failed. Exception : Cannot find certificate with thumbprint '[Thumbprint Snipped]' to decrypt protected settings."
Has anyone encountered this situation in an Azure VM? If so, what can be done to remedy this error and reset the admin password OR add an admin user to the account?
To answer this, in case anyone stumbles upon it looking for an answer, I had to do the offline password reset method outlined in Azure documentation:
Reset local Windows password for Azure VM offline
It wasn't that painful if you go slow and methodically, but as there was something misconfigured on the VM instance that was seemingly beyond my control, this was the only recourse. And while yes, this is probably better suited to ServerFault, I will leave it here to help anyone that runs into a similar situation.

Creating a new user on Azure VM that is not part of an Active Directory

How do I create a new user that can login to my Azure VM as an administrator? My top google search result mentions Active Directory. This particular machine is not on a domain. I tried creating the user under computer management and I get an unknown error and there is nothing helpful in the Event Viewer.
I also tried adding a user from the Azure Portal under Access Control for my VM instance and see a message that reads "No Virtual Machines In This Subscription Can Be Assigned Access".
Creating a user under the computer management worked for me
I just done it by login to the VM where I want the another account:
NB: these instruction are for Win Server 2012 R2 based VMs
login to the VM by using an existing admin account
Hit start and type "create an account"
click on Add a user account
Enter username & password (password should met the complexity requirements)
Hit next and you will see a message stating the user has been created
if required, the account type can be changed to admin
Hit search and type Change Account Type
choose the account
select administrator or standard
hit change account type
and you are done :)

azure linux vm recovery - unable to remote login

forgot user name password for a linux (ubuntu) vm. tried to "Reset Remote Access" from the portal, but it is not helping - more than 30 minutes - it still shown in progress. Tried to do it via azure command line. Created a new user with password, but unable to login. SSH says access denied. Should I do any additional steps?
After creating new user you should also reset your SSH connection. You could refer to Reset Access and Manage Users and Check Disks with the Azure VMAccess Extension for Linux for detailed steps.

Can I access multiple azure accounts with azure-cli from the same machine at same time?

We actually have multiple azure accounts (for some valid reason) and I want to be able to run azure-cli commands for different accounts at the same time from the same machine.
The problem with that is, once I login to one azure account with azure login, token will be stored in ~/.azure directory so I am not sure if I can login into another account exactly at the same time on that machine.
Is there any way to tell azure-cli not to store token in local profile so that I can use azure-cli to connect to multiple accounts at the same time from same machine?
If you are using a windows or mac machine then the tokens are stored in Windows token manager or OSx key chain respectively. Only on Linux systems the tokens are stored in ~/.azure/azureProfile.json
However, you should still be able to login with multiple accounts on Win/Mac or Linux machines.
azure account set "subscription-name" will set the subscription as your default subscription and all the commands that you execute will run against that subscription.
Every command has a -s or --subscription switch where you can explicitly specify the subscription id. Even if the subscription belongs to a different account, it should still work if you have authenticated with that account.
For Linux system, I would suggest to create multiple user accounts and then run the CLI from those accounts. I think there could be a race condition when two commands from different accounts try to access ~/.azure/azureProfile.json.
The latest update is that the environment variable AZURE_CONFIG_DIR has been introduced and that can be set differently for each environment before az login is called.
export AZURE_CONFIG_DIR=/tmp1
az login
and on other window
export AZURE_CONFIG_DIR=/tmp2
az login
Reference: configure the AZURE_CONFIG_DIR for fixing concurrency issue
For Windows, here are steps
Go to env variables and add AZURE_CONFIG_DIR with the value of new config folder (e.x. C:\Users\YourUser\.azure-personal)
restart your cli, then run this az login --use-device-code
use the code given on step 2 and use it with whatever browser to login to new azure account
Now, one of your accounts config is in default azure folder config (C:\Users\YourUser\.azure) and new one lives in the place you specified on step 1.
if you wanna switch between them, you need to flip that env variable to point to whatever config you want

How can I find or change my password and login for windows Azure?

It's really big problem for me - ugly UI, where I can't see ssh connection requisites for my new virtual machine instance. Is it possible to change password? Password and login from my manage.windowsazure.com panel is not approach.
I guess you are talking about a Linux VM? When creating a new VM you have to supply a username and password or you can upload an SSH key. The standard username is azureuser. There is no way to reset the password of a VM w/o having access to it.
Update: By now it's possible to create a new User/Password or upload a new SSH key via the new Azure Portal.
Got to https://portal.azure.com
Select your virtual machine
Click on Settings
Select Reset Password
Generate new certificate using this article: http://azure.microsoft.com/en-us/documentation/articles/linux-use-ssh-key/
In Azure management console, go to "CLOUD SERVICES" -> your service -> certificates
Upload you new generated certificate
Now you can login with ssh -i ~/.ssh/[private_key] azureuser#[yourappname].cloudapp.net
Have you tried changing it on the machine.
Login to the Virtual Machine via SSH with your current password. and run chpwd

Resources