azure-lab-services permission denied when connected with default credentials - azure

I'm previewing Azure Labs (managed) which is in preview at this moment. I've followed a tutorial from Microsoft on how to get started.
I've created a classroom lab with 3 virtual machines, based of a default Ubuntu image from the Marketplace. I've copied/pasted the default credentials of that template which is used for all virtual machines in that classroom lab.
Then I published it, added a user, got a registration link and used that to register as that user (a so called student). I can see the VM I expected to see. I can start it, wait some 30 seconds and then I can click on the connect button to get the ssh connection details. I open terminal, paste the ssh connection details and I get a password challenge. Excellent! So far it all works as expected. But when I enter the password I copied from the default template, permission is denied. So I try again, denied. So I wait a minute (maybe the VM needs some more time to fully boot up), but permission denied.
The tutorial looks very easy to me, I choose a default Ubuntu 18.04 LTS image to be used. I even tried to create a new classroom lab, but during creation of that template, I choose to start it, connect to it and install additional software before publishing it. That worked (as I expected). But when I publish that classroom lab, register a student account and try to login to a VM in that classroom with the correct default credentials I used to install additional software, I too get permission denied.
I'm confused.
Anyone?

Thanks to D43m0n for the feedback from Microsoft. I have been having the same issue but on CentOS images.
It appears the provisioning of the student machines after the template is published locks the default user account. Creating a new user is not such a great workaround because students will have to change the SSH or RDP settings to connect. The issue also affects more than just Ubuntu. I am seeing it on the newer version of CentOS (7.8 and greater it looks like). I think it is for any images that use cloudinit for the provisioning of the student machines. The older CentOS images use WALinuxAgent and don't seem to have this issue.
I have worked around it unlocking the default user account in /etc/rc.d/rc.local so that is executed on boot. The rc file differs on other systems so check what it is for your flavour of linux.
usermod -U default_username
This has fixed the issue for me until Microsoft fix their provisioning.

thanks for posting! Were you able to connect to the template machine (Ubuntu) and then you weren't able to connect to the student machine (Ubuntu)? Could you copy the exact error message you're seeing?
We are aware of an issue with Ubuntu images--when you connect, the VM tells you to reset the password but doesn't provide a way to do so. We're working on a feature that will resolve this issue.
Is this what you're seeing?
You can use other flavors of Linux fine.
Let us know!

In the template-vm create a new user:
sudo adduser newuser #follow the agent
sudo usermod -aG sudo newuser
after that you can start your course vm's an login with that user.

Related

No sudo permissions on google CentOS VM

It is suposed that every user in the VM created on the Google Cloud Platform has root permissions, but I haven't been able to do anything, because it says that my user has no permissions and I don't have any password, either for my user, or for root.
Is there any default password for root, or any way I could find it?
Thanks!
well i have virtual machine with ubuntu (i presume that it is the same for other linux distros as well) : login to your Google Cloud platform -> VM Instances -> click on you instance (virtual machine) , click on SSH button which is on left upper corner and for example pick a frist option Open in browser window.. when the windows opens you will be logged in as regular user with sudo permission. After that you can create users etc.. If you want to use other ssh client then go to
https://cloud.google.com/compute/docs/instances/connecting-to-instance#standardssh
it well written documentation.. the most "complicated" will be to create key pairs .. if you still have problems just ask :)

Authenticating Windows Domain users with Rstudio-server

this is my first time using Linux, and I'm shooting in the dark here.
I'm using Ubuntu 14.04 LTS and the latest version of Rstudio Server.
After much trial and error I finally managed to join my company's local domain, which enables network users to log into the Linux machine.
I have no problems logging into the Rstudio Server using a local account, but I can't log in using a network user account.
I've been on many help pages (below) but they haven't been much help:
Password Database for RStudio Server?
NIS/AD Authentication with RStudio Server
Deploying Rstudio Server for Classrooms
RStudio Server - Log-in and User Authentication Problems
Accesing RStudio using domain credentials
Any help or directions would be greatly appreciated.
I know it has been a while, but I just stumbled upon your question.
Probably it not relevant any more, nevertheless, I will briefly contribute.
Since you are a first time Linux user, I assume that you didn't make the investment of buying into the RStudio Server Professional Edition.
Active Directory user login is not available for the Open Source Edition. Only local users are allowed with the Open Source Edition.

Connect Azure RDP, "The logon attempt failed"

I've just created two Windows VM's in Azure, one 2012 Datacenter and a 2008 R2 SP1 and i am not able to connect via remote desktop to either of them. Both machines are running under the same cloud service and the RDP ports are mapped to two distinct public ports. Every time i try to connect i get the error message "The logon attempt failed".
Using NMAP in a Linux VM i also have there, i was able to check that the port 3389 is OPEN in both machines. Also, the public RDP ports respond correctly (e.g. are open).
I tried to enter using two different Windows 7 client machines, also with no lock. MSTSC version is 6.3.9600.16415, in both machines. I've used both the .rdp file, downloaded from the "Connect" option in the windows azure dashboard and a brand new RDP connection created by me - same result.
I've tried also to upgrade the VM size from small (1 core, 1.5 GBRam) to medium (2 cores, 3.6 GBRam), restart, setup a new clean windows VM, with different credentials... nothing changed, same result.
The really odd thing is that i was able to connect, after several failed attempts, to one of the VM's, the 2012 one, but only one time - after that, no luck, always "The login attempt failed".
What worked for me was changing the RDP login screen to use a different account, and use the "local account" which is the name of the VM and the username, like so:
TheVMName\TheAdminUsername
Where TheVMName is the name of your VM, and TheAdminUserName is the admin user name you used for that machine.
I was able to find/confirm the latter on the Reset Password screen under the SUPPORT + TROUBLESHOOTING section on the left.
Since Windows 10, you need the domain is automatically set to MicrosoftAccount followed by your email address as username. MicrosoftAccount\My#UserName.com
Instead, the username is like UserName.com\My.
This worked for me.
I have no idea why, but the solution is simple (works every time, at least for me): I was copy-pasting the passwords from a KeePass, as i use this to generate and maintain the huge amount of credentials i use one way or another.
SOLUTION: instead of copy-paste, type the password
The drawback is that i have to use simpler passwords for this access
I've tried to login and failed using windows 8.1 Pro to an azure vm. The message I got repeatedly was "Login Attempt Failed". So my specific problem wasn't that i couldn't connect to the machine but that it couldn't authenticate...even though my my Administrator username and password were correct.
The way I logged into the machine was to provide the host name then the username:
Host\Username
My Azure account did not have a domain controller setup.
It was simply looking for it's local host machine name.
This link helped: https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-log-on-windows-server/
May be following can help:
In this screen please select the option "Use a different account":
Further type in "Domain\Username"
TIPS:
- The "Domain" can be found on the "Overview" page for your VM in Azure. It's appearing as:
Public IP Address: [SomeIPValue].
- If you do not remember or have "Username" & "Password".The local admin "Username" & "Password" can be set to get access under:
Azure -> Your VM page -> Support + Troubleshooting -> Reset Password.
I've had a similar problem and it turned out that my password wasn't complex enough.
It was really confusing that Azure Portal even let me create a VM with such a password.
It was resolved by going to the VM page -> Support + Troubleshooting -> Reset Password and specifying a more complex password (both case letters, numbers, special characters and doesn't contain username).
Thanks to Jagjit Singh whose answer pointed me in the right direction. Hope this helps somebody.
I found that, while creating VM, if we put password without any special characters, then it still accepts the password but the login to the VM will fail using that password. It gives an error "The logon attempt failed".
It may work after the "Reset password" option but sometimes it shows "Failed to reset password".
So better to put a proper password.
I know this question is too old, answering for new visitors.
Easy solution would be, you can try to add new user or reset the password from Azure Portal
This will add the user if it does not exist, and you can try logging in with new account.
Issue : "The logon attempt failed". ( Windows azure Machine)
I have tried multiple option didn't help, hence updating this as correct answer , it worked for me .
Solution :- While creating the password/updating for windows azure vm create the password as recommended by Azure with prescribed. Main issue with password .
Steps as below for Issue fix.
Once logged in Azure portal, click on VM windows machine , go to (Support and Troubleshoot)
update the password as recommended by Azure as below
(Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character.)
Password :- updated as 13 char which include 1 Capital, Lower Case and Special ,1 number .
Password:- Azureuser#123
After updating the password as Microsoft Suggested it worked for me and able to connect windows machine as below
Able to connect as below
Try about method it should work, if issue please suggest.
We need to have strong password when we create user account for VM ..
It was annoying when I encountered this.I was only succeed when I reset my password step. Issue with portal allows is to create week password while creating VM and validation rules are different while RDP to using week password.Same validation rules applies when we re-setting password.

User Profile Service failure: No more threads can be created in the system

Has anyone encountered this issue: We have windows boxes running on Citrix XenCenter and periodically they will stop allowing RDP connections to the host (error message http://imgur.com/mKDM5uT )
"The User Profile Service service failed the logon. No more threads can be created in the system."
Currently the only way to resolve the issue is to reboot the vm. Has anyone else had this problem? Does anyone know of a fix or of a way to get into the host again without having to reboot? Thanks.
Actually there is no exact reason why this is happening in windows but this issue may occur if The C:Users(user-name) user profile folder was manually deleted instead of properly deleting the user account through User Accounts in the Control Panel. A user profile that is manually deleted does not remove the security identifier (SID) from the profile list in the registry. Since the SID is still present, Windows 7 will still try to load the profile by using the ProfileImagePath that points to a nonexistent path. Therefore, the profile cannot be loaded or The C:Users(user-name) user profile folder itself was manually renamed, instead of using the proper method in this tutorial or A unknown issue with the user profile entering into a backup state occurred or Corrupted user profile or Occasionally, Windows 7 might not read your user profile correctly, for example, if your antivirus software is scanning your computer while you try to log on. Try restarting your computer and logging on.
For permanent solution it may help you
http://www.solveinweb.com/solved-the-user-profile-service-failed-the-logon-user-profile-cannot-be-loaded/

Cannot connect with FreeNX to Ubuntu ec2 instance

I have recently spun up a new Ubuntu 12.04 instance in AWS. I had no issues connecting to and opening an SSH terminal to the server. Having connected to the instance, I was able to install the Ubuntu desktop and FreeNX without any problem, as well as enabling password authentication on the server instance.
I downloaded and installed the NX Client for Windows on a PC running Windows 8. After entering the user credentials I can connect to and authenticate into the server. I'm brand new to the Linux world, but at this point everything was going so smoothly I was about ready to throw my Windows licenses to the dogs - good thing I held off on that.
"Problem: At the client, the !M logo window appears, but after a few seconds that window just closes, even without showing any error message."
That problem statement is in quotes because it's precisely the issue described in FreeNX Ubuntu Community support documentation https://help.ubuntu.com/community/FreeNX#Troubleshooting.
So naturally I follow the solution in the guide:
"Solution: The issue is due custom VNC configuration. In the server, access your home directory and run these commands,"
sudo rm .Xauthority*
touch .Xauthority
chmod 600 .Xauthority
Unfortunately, this did absolutely nothing to resolve the issue. The problem would be easier to diagnose if I had an error message, but reference the Problem statement, there is no error message to be had. Several hours of googling yielded nothing, so wondering if anyone here has encountered this problem in the past, and if so, they would be willing to help.
Thanks!

Resources