2024-05-09 23:03:28 +01:00
|
|
|
.\"-
|
|
|
|
.\" Copyright(c) 2024 Baptiste Daroussin <bapt@FreeBSD.org>
|
|
|
|
.\"
|
|
|
|
.\" SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
.\"
|
|
|
|
.Dd May 22, 2024
|
|
|
|
.Dt MDO 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mdo
|
|
|
|
.Nd execute commands as another user
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl u Ar username
|
|
|
|
.Op Fl i
|
|
|
|
.Op command Op args
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility executes the specified
|
|
|
|
.Ar command
|
|
|
|
as user
|
|
|
|
.Ar username .
|
|
|
|
.Pp
|
|
|
|
If no
|
|
|
|
.Ar username
|
|
|
|
is provided it defaults to the
|
|
|
|
.Va root
|
|
|
|
user.
|
|
|
|
If no
|
|
|
|
.Ar command
|
|
|
|
is specified, it will execute the shell specified as
|
|
|
|
.Va SHELL
|
|
|
|
environnement variable, falling back on
|
|
|
|
.Pa /bin/sh .
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Fl i
|
|
|
|
option can be used to only call
|
|
|
|
.Fn setuid
|
|
|
|
and keep the group from the calling user.
|
|
|
|
.Sh SEE ALSO
|
2024-10-15 16:44:42 +01:00
|
|
|
.Xr su 1 ,
|
2024-05-09 23:03:28 +01:00
|
|
|
.Xr mac_do 4
|