4

Say I am logged in root, and some commands don't let me to run them in root. I tried to login different accounts, but I'm not able to do such a thing.

How can I execute such command (logged in root) without the root properties?

10
su -c "command and args" username
  • Necessary warning: You should not use shell as root unless in extremely specific conditions. – Umur Kontacı Jun 17 '15 at 23:12
4

sudo -u <user> -H <command>

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.