What user and password do I use in the sandbox?

Roosje,Michele 0 Reputation points
2024-02-17T20:38:03.4+00:00

I am trying to complete the activity in the sandbox "write a script to create virtual machine" after I write and run the script it askes for the user and password. I looked through the help questions and someone suggested using sudo -u for the user but I still don't know the password.

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,015 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dillon Silzer 54,746 Reputation points
    2024-02-17T21:33:22.6833333+00:00

    Hi Michele,

    You can reset this password using the Azure Portal:

    Azure portal

    https://github.com/Huachao/azure-content/blob/master/articles/virtual-machines/virtual-machines-linux-use-vmaccess-reset-password-or-ssh.md#azure-portal

    It would almost be better to restart and recreate the VM:

    https://learn.microsoft.com/en-us/training/modules/create-windows-virtual-machine-in-azure/3-exercise-create-a-vm User's image

    Or you can do this via Azure CLI:

    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-cli#create-virtual-machine

    Azure CLICopyOpen Cloudshell

    vmname="myVM"
    username="azureuser"
    az vm create \
        --resource-group $resourcegroup \
        --name $vmname \
        --image Win2022AzureEditionCore \
        --public-ip-sku Standard \
        --admin-username $username 
    

    If this is helpful please accept answer.