TMA-POSTGRES-4.2
Ensure sudo is configured correctly
Mô tả
It is common to have more than one authorized individual administering the PostgreSQL service at the Operating System level. It is also quite common to permit login privileges to individuals on a PostgreSQL host who otherwise are not authorized to access the server's data cluster and files.
Cách kiểm tra
Phương pháp kiểm tra: Xem xét thủ công
Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.
Check /etc/sudoers and /etc/sudoers.d: only an approved DBA group (e.g. %dba) may run commands as postgres. Test with an unauthorized user (sudo -iu postgres must be refused) and an authorized one.
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Create a DBA group, add authorized users, and add '%dba ALL=(postgres) PASSWD: ALL' via visudo -f /etc/sudoers.d/postgres.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- postgresdatabaseauthenticationsudomanual
- Tham chiếu
- CIS PostgreSQL 18 Benchmark v1.0.0 - 4.2 Ensure sudo is configured correctly