-1

I have an account which needs to execute all commands :

should i provide su - command permission for the account or set "ALL" permissions on command.

su - can elevate as root and run any command; ALL permits any command execution including root. what is benefit from a security standpoint of using one over the other for my usecase.

0

From my experience:

  • su -:

    Environment of root replaces whatever you were using before. The root password must be used.

  • sudo /bin/bash:

    Basically uses your environment augmented a bit by sudo. Specify USER password and does not use the root password.

Both put a log entry that one elevated privs by either method.

The difference between the two is having to give away the root password. Another difference is the environment setup.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.