unknown password for the sudo command in the create an Azure VM exercise. Where would this password have been set?

Beacham, Jeffrey F. (CTR) 20 Reputation points
2024-08-13T01:11:25.92+00:00

In the describe azure compute and networking services exercise 3 wants to run a sudo command as part of this script but I don't remember setting a password for my account. Any advice?

#!/bin/bash

Update apt cache. sudo apt-get update

Install Nginx. sudo apt-get install -y nginx

Set the home page. echo "<html><body><h2>Welcome to Azure! My name is $(hostname).</h2></body></html>" | sudo tee -a /var/www/html/index.html

This question is related to the following Learning Module

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,528 questions
{count} votes

Accepted answer
  1. TP 91,021 Reputation points
    2024-08-13T01:13:07.9466667+00:00

    Hi,

    You are not supposed to enter "sudo apt-get update" or "sudo apt-get install -y nginx" into the cloud shell window. These commands are run automatically in the vm you created when you copy/paste the az vm extension set... command in the code block. They mention these commands to you for informational purposes so that you know what the command is doing.

    If there is still time remaining on your sandbox go ahead and continue through the module and complete the Configure network access exercise in Unit 9. If your sandbox has expired, please Activate a new sandbox and complete Unit 3 exercise as well as Unit 9 exercise. These two exercises are intended to be completed in sequence using the same sandbox.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.