0

Is there a way to restrict a user's access so that they can still execute a command, but only with a particular flag?

For example, if I want to allow users to be able to read all files, they should be allowed to run 'chmod 444 [file]', but I don't want them to be able to set any other access level.

Or 'lspci -vvv' shows the bus speed and lane width only when running as root. But, I would like certain users to be able to see that information.

Is there a way to restrict these two commands to be run-able with only these flags.

  • 1
    see man sudoers – Bodo May 2 at 16:01
  • So, the following should work if I add it to sudoers? "%GroupName ALL=NOPASSWD: lspci -vvv, chmod 444 *" – BionicKnee May 2 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.