Skip to content

Zeroplex 生活隨筆

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

標籤: Raspberry

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, Ubuntu

提醒自己 – Respberry Pi 4 Model B 的 Wifi 只吃 2.4G

Posted on 2021 年 11 月 2 日2021 年 11 月 7 日 By 日落 在〈提醒自己 – Respberry Pi 4 Model B 的 Wifi 只吃 2.4G〉中尚無留言

手上更新到 Pi 4 的零組件總算都到期了,但是初次安裝不管怎麼樣都連不上 Wifi。
搞了半天原來我根本沒有給 Wifi 2.4G 的連線設定,5G 根本吃不到,所以整理來說腦殘浪費了一小時。

在做個筆記,很久以前提到 Ubuntu 的網路管理已經轉交給 netplan,所以 Ubuntu on Raspberry Pi 4 的狀況也一樣,有線網路、無線網路的設定也必須寫在 /etc/netplan 目錄下,更新以後將設定套用到全系統:

$ sudo netplan generate
$ sudo netplan apply
$ reboot

若需要 netplan 的語法,可以參考 netplan configuration examples。

Tags:Raspberry

RaspBian Lite – 專為台灣客製化的免初始化 image

Posted on 2019 年 9 月 10 日2021 年 3 月 12 日 By 日落 在〈RaspBian Lite – 專為台灣客製化的免初始化 image〉中尚無留言

上次給台灣人的 Raspbian 懶人版映象檔趕時間做的有點潦草,這次重新調整了一下設定。

版本:

  • Raspbian Buster Lite
  • Version: June 2019
  • Release Date: 2019-06-20
  • Kernal version: 4.19

以下是我手動調整過得設定:

  • Localization
    • Locale:en_US.utf8 + zh_TW.utf8
    • 時區:Asia/Taipei
    • 鍵盤對應:en (US)
    • Wify county:TW
  • SSH 預設啟動 (port 22)
  • 有線網路自動 DHCP
  • etc/apt/source.list 的 source 改為 NCHC (快超多)
  • apt-get upgrade @ 2019-09-09

另外採用 EricPi 的建議,我加上了 mDNS,這樣只要接到有線網路上,可以直接「ping raspberry.local」得到 IP 位址,initialize 會方便很多

下載:

載點:https://mega.nz/#!JcpxhYQb!-1A7CoYVBEal5I5iTjtQkul9W2Js8cW2xE5QEqt6yK4

SHA1: 638436e2c7b550875793d32e3ce995d9e5198f3aeceb8ed5bca3d9265c3ee061
SHA256: 638436e2c7b550875793d32e3ce995d9e5198f3aeceb8ed5bca3d9265c3ee061
Tags:mDNS, Raspberry, Raspbian

文章導覽

1 2 下一頁

其他

關於我  (About me)

小額贊助

  文章 RSS Feed

  留言 RSS Feed

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


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