Theo tài liệu của Google thì Container-Optimized OS chỉ để trên GCP. Bạn sẽ không có cơ hội được trải nghiệm hệ điều hành Linux này trên bất cứ nền tảng nào khác.
Như mọi khi tôi tò mò muốn biết hệ điều hành Linux này băm mật khẩu bằng thuật toán gì.
Coi trong /etc/shadow thì thấy mặc định nó tạo ra 1 user theo gmail đăng nhập của bạn vào GCP. Đây cũng chính là user bạn đăng nhập vào đầu tiên sau đó sudo lên root.
# 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"
KERNEL_COMMIT_ID=d013eadd440085609f9d97c64263e8122bad2c48
GOOGLE_CRASH_ID=Lakitu
GOOGLE_METRICS_PRODUCT_ID=26
VERSION=105
VERSION_ID=105
BUILD_ID=17412.495.73
# cat /etc/shadow
root:*:::::::
thaygiaoth:*:20087:0:99999:7:::
Sau khi đổi mật khẩu bằng lệnh passwd vào xem lại thì thật bất ngờ là Container-Optimized OS xài thuật toán MD5 để băm mật khẩu.
# 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: "Spread*doctor$Parent".
Enter new password:
Re-type new password:
passwd: password updated successfully
# cat /etc/shadow
root:$1$kF3PT/Oo$ta1S.ul3qnmbOv1HsO9g..:20087::::::
thaygiaoth:*:20087:0:99999:7:::
Ngộ ghê á vì từ lâu người ta đã coi MD5 là thuật toán lỗi thời, bèo gì cũng chuyển qua SHA256 hay SHA512 roài.