Highlighted
Hot Shot
Hot Shot

Deployed PhotonOS 3.0 on Azure - root password / access rights failed

Jump to solution

Hi,

I've deployed successfully PhotonOS 3.0 as Azure vm. sshlogin using the user credential defined worked fined, however the user hasn't root rights, and using the initial root password in PhotonOS docs logging-in with root is not possible.

- Isn't the initial root password change**, is it ?

- The Azure customization during vm creation has been prepared successfully by using the powershell cmdlet Set-AzVMOperatingSystem  -credential (see source line 99).

pastedImage_5.png

Any idea?

--Daniel

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Immortal
Immortal
0 Kudos
3 Replies
Highlighted
Immortal
Immortal
0 Kudos
Highlighted
Hot Shot
Hot Shot

The docs Set Up Azure Storage and Uploading the VHD · VMware Photon OS 3.0 Documentation uses the Linux Azure CLI command az vm create as there is an option --admin-username. The Azure powershell cmdlet New-AzVM does not offer something similar to --admin-username. I will change the script and post the result again.

It must have something to do with that post provisioning on Azure as pwd is not an issue on vSphere. For a password change using grub, the vm serial console in Azure resumes too late to enter grub boot menu during/after start up.

root didn't work because the Windows Azure Linux Agent makes password authentication for root account unavailable, right? photon/photondistroadd.patch at master · vmware/photon · GitHub

+Provisioning.DeleteRootPassword=y

--Daniel

0 Kudos
Highlighted
Hot Shot
Hot Shot

The PhotonOS 3.0 .vhd on Azure is provisioned with disabled root account by default. Therefore I wasn't able to login using the initial root pwd.

The powershell cmdlets new-azvm or az vm create do not accept pass the root user as --admin-username root or as -cred param. Another reserved username is 'admin' as well. Root must be re-enabled and set with a password.

whoami

sudo passwd -u root

sudo passwd root

(set new password)

su -l root

whoami

The semi-automated ps script works now 🙂 Using the az vm create --custom-data option, it may be possible to automate the post-provisioning part as well.

--Daniel

0 Kudos