当ssh进入我的机器时,我想阻止生成以下消息
Expanded Security Maintenance for Applications is not enabled.
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
由于某些原因(我不想猜测原因),这些消息不是通过正常的motd过程发出的,而是似乎来自update-notifier
。motd目录中有一些脚本似乎生成这些消息,但是删除它们没有任何效果。
如何防止系统在登录时生成这些消息?
发布于 2023-02-14 13:51:10
我发现避免这条esm消息的最简单的方法是在
/var/lib/ubuntu-advantage/apt-esm/etc/apt/sources.list.d/ubuntu-esm-apps.list
# Written by ubuntu-advantage-tools
#deb https://esm.ubuntu.com/apps/ubuntu jammy-apps-security main
# deb-src https://esm.ubuntu.com/apps/ubuntu jammy-apps-security main
#deb https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates main
# deb-src https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates main
出去吧。
发布于 2023-02-09 17:54:52
使用例如bash:
创建.hushlogin并将类似于此的内容添加到init文件中,如.bashrc_profile
grep 'immediately' /var/lib/update-notifier/updates-available
grep 'security' /var/lib/update-notifier/updates-available
grep 'upgradable' /var/lib/update-notifier/updates-available
/etc/update-motd.d/98-reboot-required
登录时:
2 updates can be applied immediately.
To see these additional updates run: apt list --upgradable
*** System restart required ***
请注意,/var/lib/update-通知程序/更新可用可能是模式0600,因此您必须修复它。
https://askubuntu.com/questions/1453749
复制相似问题