runuser Command Examples

Run commands as a user and group without asking for password (needs root privileges). More information: https://manned.org/runuser.

runuser {{user}} {{[-c|--command]}} '{{command}}'

runuser {{user}} {{[-g|--group]}} {{group}} {{[-c|--command]}} '{{command}}'

runuser {{user}} {{[-l|--login]}}

runuser {{user}} {{[-s|--shell]}} {{/bin/sh}}

runuser {{user}} {{[-p|--preserve-environment]}} {{[-c|--command]}} '{{command}}'