Section: User Commands (1)
Updated: August 2012
runuser [options] -u user command [argument...]
runuser allows to run commands with substitute user and group ID. If the option -u is not given, falls back to su compatible semantics and a shell is executed. The difference between the commands runuser and su is that runuser does not ask for a password (because it may be executed by the root user only) and it uses a different PAM configuration. The command runuser does not have to be installed with suid permissions.
When called without arguments, runuser defaults to running an interactive shell as root.
For backward compatibility runuser defaults to not change the current directory and to only set the environment variables HOME and SHELL (plus USER and LOGNAME if the target user is not root). This version of runuser uses PAM for session management.
runuser reads the /etc/default/runuser and /etc/login.defs configuration files. The following configuration items are relevant for runuser:
runuser normally returns the exit status of the command it executed. If the command was killed by a signal, runuser returns the number of the signal plus 128.
Exit status generated by runuser itself:
The runuser command is part of the util-linux package and is available from Linux Kernel Archive
Tutoriais de Tecnologia Web