Cannot create a user logon session for user: "Admin" [CloudBase-Init 1.1.6, Windows Server 2019]

asked 2025-01-14 07:16:38 +0200

aenagy gravatar image

updated 2025-01-14 07:25:59 +0200

My CloudBase-Init is failing with:

2025-01-13 23:49:12.194 4076 ERROR cloudbaseinit.plugins.windows.createuser [-] Cannot create a user logon session for user: "Admin": cloudbaseinit.exception.WindowsCloudbaseInitException: User logon failed: 'The user name or password is incorrect.'

My user-data looks like this:

users:
  - name: username-Admin
    passwd: password
    primary_group: Users
    groups:
    - Administrators
  - name: "ACME-Admin"
    passwd: &dmin@cme
    primary_group: Users
    groups:
    - Administrators
write_files:
  - path: C:\test.txt
    content: Cloudbase-Init test
runcmd:
  - 'echo Greetings from CloudBase-Init > c:\greeting.txt'
  - 'whoami /all > c:\CloudBase-Init_whoami_all.txt'

I didn't specify that CloudBase-Init should use the account 'admin'. This seems to be an assumption that CloudBase-Init has made.

Where/how do I fix this error?

edit retag flag offensive close merge delete