Sudo password error

Hello,

I had to reset my lab environment, after which I had to start the lab training from the first to bring back the training data.
I added Nginx and should add an agent. I am using the code from the lab, but I cannot go forward because of the mismatching password. This is the command from the lab:

sudo ./elastic-agent install …8220 --enrollment-token=TG5QWHFwa0JJTVVSV1h4cVc3azU6al9WbFRMVW1TbEMydm9NN21fRC1Zdw==

When I was taking the course earlier, it did not ask me any password, but now it prompts me for sudo password. I used the one from heartbeat.yml (JcRZwmwBPduguAuv), but it did not take. I also tried the training password (noprodpwd). It did not work, either. Please help me.

Error content:

elastic@ip-172-31-28-230:~/heartbeat/elastic-agent-8.8.2-linux-x86_64$ sudo ./elastic-agent install --…r:8220 --enrollment-token=TG5QWHFwa0JJTVVSV1h4cVc3azU6al9WbFRMVW1TbEMydm9NN21fRC1Zdw==
[sudo] password for elastic:
Sorry, try again.
[sudo] password for elastic:
Sorry, try again.
[sudo] password for elastic:

========================================================================

Full command:
curl - … beats/elastic-agent/elastic-agent-8.8.2-linux-x86_64.tar.gz
tar xzvf elastic-agent-8.8.2-linux-x86_64.tar.gz
cd elastic-agent-8.8.2-linux-x86_64
sudo ./elastic-agent install --url=… --enrollment-token=TG5QWHFwa0JJTVVSV1h4cVc3azU6al9WbFRMVW1TbEMydm9NN21fRC1Zdw==

Hello @sbelmont

Could you please check the below post if it is helpful in your case :

Thanks!!

The SU password error has been replaced to a new error. I was running the command in the directory as you recommended. How can I run the command elsewhere??

I cannot copy the full error message because this post spits out error for the content:
An error occurred: Sorry you cannot post a link to that host.

============= This is some of the error content

Elastic Agent will be installed at blah/Agent and will run as a service. Do you want to continue? [Y/n]:Y

"file.name":"cmd/enroll_cmd.go","file.line":478,"message":"Starting enrollment to :

Error: fail to enroll: fail to execute request to fleet-server: x509: certificate signed by unknown authority