---
title: Fix the wrong user configuration of cloud-init on Debian 12 (Bookworm)
description: This page helps you fix the wrong user configuration of cloud-init on Debian 12 (Bookworm)
tags: debian12 debian bookworm cloud-init
dates:
  validation: 2025-07-15
  posted: 2023-05-04
---

Debian 12 (Bookworm) Instances created before June 2nd, 2023 were delivered with a preinstalled version of `cloud-init` that came with a wrong user configuration made by the custom-built upstream `cloud-init 23.2`.<br />

The issue has been fixed for Instances created  after June 2nd, 2023. The Debian 12 image now uses the official Debian Unstable `cloud-init` package.<br />

Run the following commands to fix the issue on an Instance affected by this bug:
```bash
wget http://ftp.fr.debian.org/debian/pool/main/c/cloud-init/cloud-init_23.2-1_all.deb -O /tmp/cloud-init_23.2-1_all.deb

dpkg -i /tmp/cloud-init_23.2-1_all.deb

for FILE in /etc/group /etc/gshadow /etc/passwd /etc/shadow /etc/subgid /etc/subuid /etc/sudoers.d/90-cloud-init-users;
do
sed -i -e 's/Ubuntu/Debian/g' -e 's/ubuntu/debian/g' $FILE
done
```