5

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?

2 Answers 2

10
su -c "command and args" username
1
  • Necessary warning: You should not use shell as root unless in extremely specific conditions. Jun 17, 2015 at 23:12
4

sudo -u <user> -H <command>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .