0

in my product, i need to enable root user by default in autoinstall user-data file

Expectation: root user login by default post installation

i followed the below,

version: 1
user-data:
    disable_root: false
identity:
    hostname: hostname
    username: root
    password: $6$AYtLXyyVZAea2aLJ$UQxW1cz2vWWNn.17.3QYH5TxZqIMGoLJCpqbBTfClhUKxqouYn7/Yc5Jsq.bCeK0VDLPxbL6xzfJ0xqTb6MLk.

Do we need to edit target /etc/ssh/sshd_config and add PermitRootLogin to yes?

Any other method it will be helpful

  • The "identity" is for creating a normal user. Have you tried the "authorized-keys" in the SSH part ? – Marco Sep 09 '23 at 06:34
  • 1
    "in my product, i need to enable root user by default.". In this year of 2023, there is NO excuse for such bad system design. No security aware person will install your "product". Read man sudo sudoers and redesign. – waltinator Sep 09 '23 at 18:58
  • https://askubuntu.com/a/1419491/376778 – Andrew Lowther Sep 12 '23 at 21:52

0 Answers0