mistress
verily.8.in
1#include "config"
2.\" -*- coding: utf-8; -*- "
3.Dd $Mdocdate$
4.Dt verily 8
5.Os
6.Sh NAME
7.Nm verily
8.Nd run commands as different class, group, or user
9.Sh SYNOPSIS
10.Nm
11.Op Fl n
12#ifdef HAVE_LOGIN_CAP
13.Op Fl c Ar class
14#endif
15.Op Fl G Ar gid
16.Op Fl g Ar group
17#ifdef CONFIG_CHROOT
18.Op Fl r Ar dir
19#endif
20.Op Fl U Ar uid
21.Op Fl u Ar user
22.Op Ar cmd
23.Op Ar args ...
24.Sh DESCRIPTION
25The
26.Nm
27utility allows a user to run a command
28.Po Ev $SHELL Fl i
29if no command is specified
30.Pc
31with a different
32#ifdef HAVE_LOGIN_CAP
33login class,
34#endif
35group id,
36#ifdef CONFIG_CHROOT
37root directory,
38#endif
39or user id, provided that the user is a member of the CHECKGRP group and has
40write permission on
41.Pa CHECKFILE .
42The options are as follows:
43.Bl -tag -width 8n
44#ifdef HAVE_LOGIN_CAP
45.It Fl c Ar class
46Specify a login class.
47#endif
48.It Fl G Ar gid
49Specify a group id.
50.It Fl g Ar group
51Specify a group name.
52.It Fl n
53Don
54.Ap
55t execute a command, only check for authorization.
56#ifdef CONFIG_CHROOT
57.It Fl r Ar dir
58Specify a new root directory to
59.Xr chroot 2
60into.
61#endif
62.It Fl U Ar uid
63Specify a user id. If the
64.Fl s
65option is not supplied in an invocation, the
66.Nm
67utility defaults to user id 0.
68.It Fl u Ar user
69Specify a user name.
70.El
71.Sh ENVIRONMENT
72.Bl -tag -width Ds
73.It Ev SHELL
74Used as the default command
75.Pq with the Fl i No flag
76when invoked without arguments.
77.El
78.Sh FILES
79.Bl -tag -width Ds
80.It Pa CHECKFILE
81The user must have write permission on this file in order to invoke the
82.Nm
83utility.
84.El
85.Sh EXIT STATUS
86The
87.Nm
88utility exits 0 on success, and >0 if an error occurs or if the user is not
89authorized.
90.Sh SEE ALSO
91#ifdef CONFIG_CHROOT
92.Xr chroot 1 ,
93#endif
94.Xr doas 1 ,
95#ifdef HAVE_LOGIN_CAP
96.Xr login 1 ,
97#endif
98.Xr su 1 ,
99.Xr sudo 1 ,
100.Xr really 8 .
101.Sh AUTHORS
102.An Emilia Smólska Aq Mt emilia@hopeserv.net
103.Sh SECURITY CONSIDERATIONS
104Installing
105.Nm
106setuid is unlikely to compromise the security of the system. It is intended to
107serve as a convenient safeguard for administrator accounts that are equivalent
108in power to root, and not as a comprehensive user-switching tool like
109.Xr doas 1 .
110.Sh MAKE ME A SANDWICH
111.Lk "https://xkcd.com/149"