Define a digest for a command for multiple files in a sudoers configuration
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start by reading the sudoers documentation for command digests, command aliases, and sudoedit file arguments; the issue does not name a source file or test. Clarify whether and how a digest can be specified for sudoedit commands that are restricted to particular files, and document a working configuration or the limitation. Done means the documented guidance addresses the examples in the issue.
Written by the indexing model from the issue text.
Description
Hi Team,
I am configuring sudo in my RedHat 8 node using the digest feature.
So for the command that needs full whitelisting, I am allowing using the below method which is working fine.
%my_group_name ALL=(ALL) NOPASSWD:SETENV: sha224:8c3f2dea6e13bb4a4fbed2314d6f2a1ba00f79c63faac6b2907f09bf8 /usr/bin/ls
But there are a few commands that I need to allow for limited files as -
Cmnd_Alias SUDOEDIT = sudoedit /etc/sudoers, sudoedit /var/log/audit/audit.log, sudoedit /etc/audit/auditd.conf
When I am allowing this using the below entry, it is not working.
**%my_group_name ALL=(ALL) NOPASSWD:SETENV: sha224:8c3f2dea6e13bb4a4fbed2314d6f2a1ba00f79c63faac6b2907f09bf8 SUDOEDIT **
OR
Defaults!SUDOEDIT digest_sha512=ad8a2af7358908c6ed8978c4104316b0f500b0c1432ae31b373e41559d3044fe4ce4d4c8b210754cb6ae2925316eec9384fa583c1122660d59e6e08c29a6e5e9
%my_group_name ALL=(ALL) NOPASSWD: SUDOEDIT
I need support on how to define any command when it needs to only allow specific files to be executed with a digest check.
- Dominant language
- C
- Stars
- 1.7k
- Forks
- 306
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 22
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sudo-project/sudo
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
sudo-project/sudo#583 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
sudo-project/sudo#581 · 4 comments ·
Maintainers usually reply within 1 day
-
Signal forwarded to the command is lost when it arrives between fork() and execve() of the commandOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sudo-project/sudo#566 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
sudo-project/sudo#553 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
sudo-project/sudo#552 ·
Maintainers usually reply within 1 day
All issues in sudo-project/sudo
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
libsdl-org/SDL#16607 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PowerShell/Win32-OpenSSH#2482 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zephyrproject-rtos/zephyr#123881 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day