| SUDO(8) | sudo-rs | SUDO(8) |
sudo - execute a command as another user
sudo [-u user] [-g group] [-D directory] [-BknS] [-i | -s] [VAR=value] [<command>]
sudo -h | -K | -k | -V
sudo allows a user that is permitted to do so to execute a command as another user (for example root). Permissions are specified by a security policy specified in /etc/sudoers (see sudoers(5)).
Sudo-rs is a safety oriented and memory safe re-implementation of the original sudo implementation by Todd Miller.
When a command is run, a session record is stored for that specific session allowing users to run additional commands without having to re-authenticate. The timeout for session records can be specified in the policy.
Some care is taken to pass signals received by sudo-rs to the child process, even if that process runs in its own pseudo terminal.
When used in conjunction with a command or an option that may require a password, this option will cause sudo-rs to ignore the user’s session record. As a result, authentication will take place if the policy requires it. When used in conjunction with a command no invalidation of existing session records will take place.
%H expanded to the local host name
%h expanded to the local host name without the domain name
%p expanded to the name of the user whose password is being requested
(this respects the rootpw, targetpw flags)
%U expanded to the login name of the user the command will be run as
(defaults to root unless the -u option is also specified)
%u expanded to the invoking user's login name
%% two consecutive ‘%’ characters are collapsed into a single ‘%’ character
The custom prompt will override the default prompt or the one specified by the SUDO_PROMPT enviroment variable. No prompt will suppress the the prompt provided by PAM, unless the requested prompt is empty ("")
Environment variables to be set for the command may be passed on the command line in the form of VAR=value. Variables passed on the command line are subject to restrictions imposed by the security policy. Variables passed on the command line are subject to the same restrictions as normal environment variables with one important exception: If the command to be run has the SETENV tag set or the command matched is ALL, the user may set variables that would otherwise be forbidden. See sudoers(5) for more information.
| sudo-rs 0.2.5 |