如何在 CentOS 8 中允许一个用户访问 atd 服务并拒绝另一个用户访问?

How to enable access to the atd service for one user and deny for another in CentOS 8?

是否可以限制特定用户访问服务并允许其他用户访问服务?

是的,您可以明确控制谁可以创建 at 个职位。请参阅 at.allow(5) 和 at.deny(5) 手册页。

The /etc/at.allow and /etc/at.deny files determine which user can submit commands for later execution via at(1) or batch(1).

The format of the files is a list of usernames, one on each line. Whitespace is not permitted.

If the file /etc/at.allow exists, only usernames mentioned in it are allowed to use at.

If /etc/at.allow does not exist, /etc/at.deny is checked. every username not mentioned in it is then allowed to use at.

An empty /etc/at.deny means that every user may use at.

If neither exists, only the superuser is allowed to use at.