Container-Optimized OS là hệ điều hành Linux chuyên dụng của Google trên Google Cloud Platform và chỉ có trên GCP mà thôi.
Nói cách khác nếu không xài GCP, bạn sẽ không có cơ hội xài Container-Optimized OS.
Và điều thú vị nữa là nó chỉ chạy được phần mềm đóng gói thành Container mà thôi.
Nó không chạy được với phần mềm chạy từ file nhị phân ELF cũng như được đóng gói thành dạng khác như RPM, DEB, APK…
Thật bất ngờ là Container-Optimized OS mã hóa mật khẩu bằng thuật toán MD5 cũ rích.
# cat /etc/os-release
NAME="Container-Optimized OS"
ID=cos
PRETTY_NAME="Container-Optimized OS from Google"
HOME_URL="https://cloud.google.com/container-optimized-os/docs"
BUG_REPORT_URL="https://cloud.google.com/container-optimized-os/docs/resources/support-policy#contact_us"
GOOGLE_CRASH_ID=Lakitu
GOOGLE_METRICS_PRODUCT_ID=26
KERNEL_COMMIT_ID=2e89dc9fc1cfcb0184104491d7f412eee640086b
VERSION=109
VERSION_ID=109
BUILD_ID=17800.519.18
# cat /etc/shadow
root:*:::::::
thaygiaoth:*:20246:0:99999:7:::
# passwd
You can now choose the new password or passphrase.
A valid password should be a mix of upper and lower case letters, digits, and
other characters. You can use a password containing at least 7 characters
from all of these classes, or a password containing at least 8 characters
from just 3 of these 4 classes.
An upper case letter that begins the password and a digit that ends it do not
count towards the number of character classes used.
A passphrase should be of at least 3 words, 11 to 72 characters long, and
contain enough different characters.
Alternatively, if no one else can see your terminal now, you can pick this as
your password: "bone8quake8Eye".
Enter new password:
Re-type new password:
passwd: password updated successfully
# cat /etc/shadow
root:$1$Wpl4E7Ex$olg5v8jna7hfoC3QU3Gel1:20246::::::
thaygiaoth:*:20246:0:99999:7:::
Thuật toán MD5 còn cũ hơn thuật toán SHA256 nữa và hiện này người ta khuyến cáo không xài thuật toán này để mã hóa mật khẩu, không biết tại sao Google vẫn xài nhỉ?
Tôi có nấu nướng lại công nghệ lõi Linux trên AlmaLinux 9 để nó chạy không cần initramfs như trên Container-Optimized OS của Google, mời các bạn cùng xem.