在服务器上随手update & upgrade时,忽地发现了输出的一条信息:
Get more security updates through Ubuntu Pro with 'esm-apps' enabled: libmagickwand-6.q16-6 libmagickcore-6.q16-6 imagemagick-6-common Learn more about Ubuntu Pro at https://ubuntu.com/pro
通过Ubuntu Pro获得更多的安全更新?于是我顺手就去Ubuntu看了一眼。
简单搬运官网的表格:
| SECURITY PATCHING | UBUNTU LTS | UBUNTU PRO (INFRA-ONLY) | UBUNTU PRO |
|---|---|---|---|
| Over 2,300 packages in Ubuntu Main repository | 5 years | 10 years | 10 years |
| Over 23,000 packages in Ubuntu Universe repository | Best effort | Best effort | 10 years |
| Optional phone/ticket support | No | Yes | Yes |
| COMPLIANCE AND HARDENING | UBUNTU LTS | UBUNTU PRO (INFRA-ONLY) | UBUNTU PRO |
|---|---|---|---|
| NIST-certified FIPS crypto-modules | No | Yes | Yes |
| USG hardening with CIS and DISA-STIG profiles | No | Yes | Yes |
| Common Criteria EAL2 | No | Yes | Yes |
| OTHER FEATURES | UBUNTU LTS | UBUNTU PRO (INFRA-ONLY) | UBUNTU PRO |
|---|---|---|---|
| Kernel Livepatch | No | Yes | Yes |
| Real-time kernel | No | Yes | Yes |
| Systems management at scale with Landscape | No | Yes | Yes |
额,可能最直接的区别就是对于安全更新的支持从LTS的5年延长到了Pro的10年了吧……然后就是下面的实时内核补丁。
既然是Pro那么一定要钱吧(想当然)?不过令人意外的是,Ubuntu官方允许个人用户在最多5台设备上启用Pro。
Anyone can use Ubuntu Pro for free on up to 5 machines, or 50 if you are an official Ubuntu Community member.
查了一下才发现,至少在去年12月之前Canonical就已经允许个人免费使用Pro了(我真的是火星了)。
然后需要注意的是,Ubuntu Pro只面向LTS,然后要求16.04及以上,也即16.04 LTS,18.04 LTS,20.04 LTS,22.04 LTS。
Step Zero: Register a Ubuntu account.其实我很讨厌这种动不动就注册的,天知道会拿着我的信息干嘛。不过也还算能理解,毕竟Canonical又不是将所有Ubuntu免费升级到Ubuntu Pro……那么没办法只能注册一个Ubuntu One了,但愿Canonical不会时不时地发垃圾邮件过来……
OK,你现在注册了Ubuntu One,并且在Ubuntu网站上登录了,那么你应该可以在https://ubuntu.com/pro/dashboard上看到你的Free Personal Token了。这个Token就是你在设备上启用Ubuntu Pro的凭据。
由于个人用户开放免费使用是在去年末,所以要求pro的版本比较新。官方文档说要求pro版本在27.13.1及以上。以下是我自己的服务器的版本:
root@qinxiaohuang-ubuntu:~# pro --version 27.14.4~22.04
前面代表Pro版本为27.14.4,后面代表Ubuntu版本为22.04 LTS。
一般来说这个Pro版本的更新会随着apt upgrade这个命令完成。但如果你比较急急急那么可以直接上("Consider bypassing the update phasing and install the latest client version using the following command"):
$ sudo apt install ubuntu-advantage-tools
然后你就可以attach这个token到你的设备上了。
root@qinxiaohuang-ubuntu:~# pro attach ABCDEFGHIJKLMNOPQRSTUVWXYZ1234 Enabling default service esm-apps Updating package lists Ubuntu Pro: ESM Apps enabled Enabling default service esm-infra Updating package lists Ubuntu Pro: ESM Infra enabled Enabling default service livepatch Installing canonical-livepatch snap Canonical livepatch enabled. This machine is now attached to 'Ubuntu Pro - free personal subscription' SERVICE ENTITLED STATUS DESCRIPTION esm-apps yes enabled Expanded Security Maintenance for Applications esm-infra yes enabled Expanded Security Maintenance for Infrastructure livepatch yes enabled Canonical Livepatch service realtime-kernel yes disabled Ubuntu kernel with PREEMPT_RT patches integrated usg yes disabled Security compliance and audit tools NOTICES Operation in progress: pro attach Enable services with: pro enable <service> Account: www.qinxiaohuang@outlook.com Subscription: Ubuntu Pro - free personal subscription
很遗憾的是,对于Ubuntu 22.04,有些功能居 然还不可用:
This output will depend on your Ubuntu LTS version; for instance ‘fips’, ‘fips-updates’ and ‘usg’ are not yet available on Ubuntu 22.04 LTS.
于是乎你可以看到我的realtime-kernel(实时内核补丁)和usg(Ubuntu Subscription Global服务)并没有启用。但是没有关系!可以手动启用:
root@qinxiaohuang-ubuntu:~# pro enable usg One moment, checking your subscription first Updating package lists Ubuntu Security Guide enabled Visit https://ubuntu.com/security/certifications/docs/usg for the next steps
不过livepatch和realtime-kernel是互斥的:
root@qinxiaohuang-ubuntu:~# pro enable realtime-kernel One moment, checking your subscription first Real-time kernel cannot be enabled with Livepatch. Disable Livepatch and proceed to enable Real-time kernel? (y/N)
那么没办法,最后只能是这样了:
root@qinxiaohuang-ubuntu:~# pro status SERVICE ENTITLED STATUS DESCRIPTION esm-apps yes enabled Expanded Security Maintenance for Applications esm-infra yes enabled Expanded Security Maintenance for Infrastructure livepatch yes enabled Canonical Livepatch service realtime-kernel yes disabled Ubuntu kernel with PREEMPT_RT patches integrated usg yes enabled Security compliance and audit tools Enable services with: pro enable <service> Account: www.qinxiaohuang@outlook.com Subscription: Ubuntu Pro - free personal subscription
如果已经attach上了,只需要常规的update和upgrade就好了:
apt update && apt upgrade -y
有意思的是,我的服务器是腾讯云的,然后腾讯云有内部的apt镜像。在启用了Pro之后,可以看到update和upgrade除了get腾讯云的文件,还会跑去Ubuntu官网去找文件。不过没在/etc/apt/sources.list找到Ubuntu的源的字符串,也懒得找了。
最后一个问题:怎么解绑?
pro detach
对了对了,WSL也有这玩意儿(尬住了)。然后的话不是挂着服务的设备就没必要开这玩意儿了,毕竟没有功能性更新全是安全性更新。如果没有挂在公网上面提供服务的话意义不大。当然搞基人除外。
然而Pro并没有提供OpenSSL的最新包或者补丁以修复CVE-2022-3602(披露时间2022-11),确实有点尴尬。
Get started with Ubuntu Pro | Ubuntu
https://ubuntu.com/pro/tutorial
上一篇:Ubuntu安装中文语言包
下一篇:新电脑首次开机跳过联网激活