spurin / diveintoansible-lab

Dive Into Ansible Lab
850 stars 531 forks source link

Unable to Login with user:ubuntu password:password #51

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello Spurin,

I tried changing the path within .env to one instructed in README but was again unable to login, with username ansible and the password as password

Sharing the details of my system below for your perusal:

Previously I had cloned the repo within my WSL2 Ubuntu20.04 OS but made the below changes to the .env file

WSL_ Ubuntu-20 04 -VisualStudioCode

But still getting login error as shared below: FailedLoginUbuntu-c

In my next attempt, I cloned the repo to diveintoansible-lab

and

made the following changes to the .env file

Shared config volume

CONFIG=/mnt/c/Users/demo_user/diveintoansible-lab/ansible_home

Shared home directories

ANSIBLE_HOME=/mnt/c/Users/demo_user/diveintoansible-lab/ansible_home

But still no luck. Requesting you to help me out to resolve this issue, please. Thanks

ghost commented 3 years ago

WhatsAppImage

spurin commented 3 years ago

Hi @olivetech101

Thanks for reaching out. Could you please confirm for me, what your username is for logging into windows? In the output I see both demo_user and olivetech. For this, we need to tally up to the user in question.

Can you please try the following, we’re looking for the example that shows the username of ansible when run -

docker run --rm -v /host_mnt/c/users/demo_user/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

docker run --rm -v /mnt/c/users/demo_user/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

docker run --rm -v /c/users/demo_user/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

docker run --rm -v /host_mnt/c/users/olivetech/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

docker run --rm -v /mnt/c/users/olivetech/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

docker run --rm -v /c/users/olivetech/diveintoansible-lab/config:/config ubuntu cat /config/guest_name

ghost commented 3 years ago

I am logging as _demouser into windows, I can definitely confirm that. Though a way to get past this, I have created a Ubuntu 20.04 VM using VirtualBox and trying to set up my env on virtualbox VM, hope that works. Will holler you in case I get stuck with it also.

spurin commented 3 years ago

Hi @olivetech101

If you try those commands, it might be a quick fix for you. I’ve seen sometimes that the variables can be case sensitive (noticed some uppercase in your tests).

I also have a prebuilt VM configured and good to go with port forwarding that I can share with you if that helps?

ghost commented 3 years ago

Screenshot from 2021-08-01 16-10-57 Getting Invalid on my VM as well, so I reckon user is not the issue :S

ghost commented 3 years ago

Trying Again Screenshot from 2021-08-01 16-31-17

ghost commented 3 years ago

Screenshot from 2021-08-01 16-32-34 Tried loggin with ubuntu and mayank my current user on ubuntu20.04 VM but no luck.

ghost commented 3 years ago

trying those commands suggested by you now. will come back with updates.

spurin commented 3 years ago

What username/password are you using?

spurin commented 3 years ago

Ahh I see above, the username and password you need is ansible password

ghost commented 3 years ago

Yes, I just observed that too. My bad, really appreciate your patience while trying to debug a silly error here. Again apologies. will kickstart the study now following oreilly course.

spurin commented 3 years ago

@olivetech101 no worries and my bad too, I jumped into this issue without fully digesting the subject. Let’s also try and get this working on your desktop too. If it’s not working, come back to me and we’ll get it resolved 👍

ghost commented 3 years ago

I can confirm it working on desktop too, I feel ashamed, gonna dive now in that pool now. 🙌

spurin commented 3 years ago

It’s all good @olivetech101 😁😁. Hope you enjoy the course! 🚀