You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runuser's manual says: runuser [options] -u user command [argument...]
suggesting that anything passed on the command line after -u user is part of the command and its arguments.
However, the following command generates an error:
# runuser -u myuser ls -l
runuser: options --(shell,fast,command,session,session-command,login) and --user are mutually exclusive
The parser thinks that -l is an argument to runuser, rather than an argument to the command ls.
To get it to work I have to create a shell file (file.sh) containing ls -l, then use: runuser -u myuser /bin/bash file.sh
Activity
karelzak commentedon Jan 19, 2017
You have to use "--" as a separator, for example:
I have updated the man page. Thanks.
fabiocannizzo commentedon Jan 19, 2017
Thank you.