Password for image CentOS-7-x86_64-Azure-1707.qcow2

General support questions
Post Reply
Minpu Kang
Posts: 4
Joined: 2018/10/28 14:36:59

Password for image CentOS-7-x86_64-Azure-1707.qcow2

Post by Minpu Kang » 2018/10/28 14:44:38

Hello Support

I am trying to instantiate a VM with image CentOS-7-x86_64-Azure-1707.qcow2 without ssh key.
Then password is required.
Does anyone know the password for user root or centos in this image?

Thanks
BRs/Minpu

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Password for image CentOS-7-x86_64-Azure-1707.qcow2

Post by TrevorH » 2018/10/28 15:31:33

From https://wiki.centos.org/Cloud/AWS
Root passwords are generated at first-boot for these images, applied and then locked. This is to ensure that every image has a unique root password.
The 'centos' user also has no password set and you cannot logon using it without using an ssh key. If this was not true then all CentOS images would share the same password and that would be horrible for security.

Use ssh keys, that's what they are there for. Also why are you using an image that's 15 months old?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Minpu Kang
Posts: 4
Joined: 2018/10/28 14:36:59

Re: Password for image CentOS-7-x86_64-Azure-1707.qcow2

Post by Minpu Kang » 2018/10/29 01:39:08

Thanks for your reply, then I should think to use the ssh key as mandatory.

For image, i did see the ones of this year, and now i just check the images on 2018-10-05 which i will use.

Minpu Kang
Posts: 4
Joined: 2018/10/28 14:36:59

Re: Password for image CentOS-7-x86_64-Azure-1707.qcow2

Post by Minpu Kang » 2018/12/11 07:10:36

hello All

This is fixed with injecting the config file:
in Hot File:
user_data: { get_file: vToolServer.conf}
user_data_format: RAW

And then add the clis in the conf:
runcmd:
- echo centos:centos | chpasswd
- echo root:root | chpasswd


Then the password of root/centos will be reset.

Thanks
BRs/Minpu

Post Reply