Skip to content

Zeroplex 生活隨筆

軟體開發、伺服器和生活瑣事

小 縮小字型大小。 中 重設字型大小。 大 放大字型大小。

Ubuntu 20.04 Failed to Change Password while Using cloud-init

Posted on 2022 年 1 月 22 日2022 年 2 月 22 日 By 日落 在〈Ubuntu 20.04 Failed to Change Password while Using cloud-init〉中尚無留言

Cloud-Init should allow you to modify password after first time login. But if SSH closed while changing password:

WARNING: Your password has expired.
You must change your password now and login again!
Changing password for ubuntu.
Current password:
passwd: Authentication token manipulation error
passwd: password unchanged
Connection to 192.168.0.102 closed.

There might be Cloud-Init issue in older version.

There is a workaround to by-pass force passwd. Find /boot/firmware/user-data in the boot partition, then you will see options:

# On first boot, set the (default) ubuntu user's password to "ubuntu" and
# expire user passwords
chpasswd:
  expire: true
  list:
  - ubuntu:ubuntu

Update expire to false if you do not want to change password in first login. Or create your own username/password in list if expire is not work.

Please notice that device is not safe using default user name and password. Change it after you connect to the device.

Tags:Linux, Raspberry Pi, Ubuntu

文章導覽

Previous Post: Google Chrome 大量使用 CPU 運算資源
Next Post: PostgreSQL 繁體中文文件

發佈留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *


其他

關於我  (About me)

小額贊助

  文章 RSS Feed

  留言 RSS Feed

Apache AWS Bash C/C++ Docker FreeBSD GCP Git Google Java JavaScript Laravel Linux Microsoft MSSQL MySQL Nginx PHP PHPUnit PostgreSQL Python Qt Ubuntu Unix Vim Web Windows WordPress XD 作業系統 分享 好站推薦 專題 攝影 新奇搞笑 新聞 旅遊 生活雜記 程式設計 網路架站 網頁設計 資訊學習 資訊安全 遊戲 音樂


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-相同方式分享 4.0 國際 授權條款授權.