-u user The -u (user) option causes sudo to run the specified command as a user other than root. To
specify a uid instead of a user name, use #uid. When running commands as a uid, many shells
require that the '#' be escaped with a backslash ('\'). Security policies may restrict uids
to those listed in the password database. The sudoers policy allows uids that are not in the
password database as long as the targetpw option is not set. Other security policies may not
support this.
|
sudo allows a permitted user to execute a command as the superuser or another user, as specified by the
security policy. The real and effective uid and gid are set to match those of the target user, as
specified in the password database, and the group vector is initialized based on the group database
(unless the -P option was specified).
|