2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Build .man.in and .cat files from .mdoc.in files.

Add new --with-man and --with-mdoc configure options.
This commit is contained in:
Todd C. Miller 2012-07-19 13:41:14 -04:00
parent 0d8aa46bb1
commit 90f2cfa589
24 changed files with 11796 additions and 8617 deletions

10
INSTALL
View File

@ -348,6 +348,16 @@ Special features/options:
Enable support for role based access control (RBAC) on Enable support for role based access control (RBAC) on
systems that support SELinux. systems that support SELinux.
--with-man
Use the "man" macros for manual pages. By default, mdoc
versions of the manuals are installed. This can be used
to override configure's test for "nroff -mdoc" support.
--with-mdoc
Use the "mdoc" macros for manual pages. By default, mdoc
versions of the manuals are installed. This can be used
to override configure's test for "nroff -mdoc" support.
The following options are also configurable at runtime: The following options are also configurable at runtime:
--with-long-otp-prompt --with-long-otp-prompt

View File

@ -81,24 +81,22 @@ doc/schema.OpenLDAP
doc/schema.iPlanet doc/schema.iPlanet
doc/sudo.cat doc/sudo.cat
doc/sudo.man.in doc/sudo.man.in
doc/sudo.man.pl doc/sudo.mdoc.in
doc/sudo.pod
doc/sudo_plugin.cat doc/sudo_plugin.cat
doc/sudo_plugin.man.in doc/sudo_plugin.man.in
doc/sudo_plugin.pod doc/sudo_plugin.mdoc.in
doc/sudoers.cat doc/sudoers.cat
doc/sudoers.ldap.cat doc/sudoers.ldap.cat
doc/sudoers.ldap.man.in doc/sudoers.ldap.man.in
doc/sudoers.ldap.pod doc/sudoers.ldap.mdoc.in
doc/sudoers.man.in doc/sudoers.man.in
doc/sudoers.man.pl doc/sudoers.mdoc.in
doc/sudoers.pod
doc/sudoreplay.cat doc/sudoreplay.cat
doc/sudoreplay.man.in doc/sudoreplay.man.in
doc/sudoreplay.pod doc/sudoreplay.mdoc.in
doc/visudo.cat doc/visudo.cat
doc/visudo.man.in doc/visudo.man.in
doc/visudo.pod doc/visudo.mdoc.in
include/Makefile.in include/Makefile.in
include/alloc.h include/alloc.h
include/error.h include/error.h

3
NEWS
View File

@ -33,6 +33,9 @@ What's new in Sudo 1.8.6?
of "N incorrect password attempts". Likewise, the "mail_no_perms" of "N incorrect password attempts". Likewise, the "mail_no_perms"
sudoers option now takes precedence over "mail_badpass". sudoers option now takes precedence over "mail_badpass".
* The sudo manuals are now formatted in mdoc. Versions using the
legacy man macros are provided for systems that lack mdoc.
What's new in Sudo 1.8.5p2? What's new in Sudo 1.8.5p2?
* Fixed use of the SUDO_ASKPASS environment variable which was * Fixed use of the SUDO_ASKPASS environment variable which was

72
configure vendored
View File

@ -731,6 +731,7 @@ SUDOERS_MODE
SHLIB_MODE SHLIB_MODE
MANCOMPRESSEXT MANCOMPRESSEXT
MANCOMPRESS MANCOMPRESS
MANDIRTYPE
MANTYPE MANTYPE
AUTH_OBJS AUTH_OBJS
OSDEFS OSDEFS
@ -871,6 +872,8 @@ with_interfaces
with_stow with_stow
with_askpass with_askpass
with_plugindir with_plugindir
with_man
with_mdoc
enable_authentication enable_authentication
enable_root_mailer enable_root_mailer
enable_setreuid enable_setreuid
@ -1655,6 +1658,8 @@ Optional Packages:
--with-stow deprecated --with-stow deprecated
--with-askpass=PATH Fully qualified pathname of askpass helper --with-askpass=PATH Fully qualified pathname of askpass helper
--with-plugindir set directory to load plugins from --with-plugindir set directory to load plugins from
--with-man manual pages use man macros
--with-mdoc manual pages use mdoc macros
--with-selinux enable SELinux support --with-selinux enable SELinux support
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both] both]
@ -2899,6 +2904,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
# #
@ -2946,7 +2952,7 @@ secure_path="not set"
INSTALL_NOEXEC= INSTALL_NOEXEC=
devdir='$(srcdir)' devdir='$(srcdir)'
PROGS="sudo" PROGS="sudo"
: ${MANTYPE='man'} : ${MANDIRTYPE='man'}
: ${mansrcdir='.'} : ${mansrcdir='.'}
: ${SHLIB_MODE='0644'} : ${SHLIB_MODE='0644'}
: ${SUDOERS_MODE='0440'} : ${SUDOERS_MODE='0440'}
@ -5208,6 +5214,34 @@ fi
# Check whether --with-man was given.
if test "${with_man+set}" = set; then :
withval=$with_man; case $with_man in
yes) MANTYPE=man
;;
no) as_fn_error $? "\"--without-man not supported.\"" "$LINENO" 5
;;
*) as_fn_error $? "\"ignoring unknown argument to --with-man: $with_man.\"" "$LINENO" 5
;;
esac
fi
# Check whether --with-mdoc was given.
if test "${with_mdoc+set}" = set; then :
withval=$with_mdoc; case $with_mdoc in
yes) MANTYPE=mdoc
;;
no) as_fn_error $? "\"--without-mdoc not supported.\"" "$LINENO" 5
;;
*) as_fn_error $? "\"ignoring unknown argument to --with-mdoc: $with_mdoc.\"" "$LINENO" 5
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do user authentication by default" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do user authentication by default" >&5
$as_echo_n "checking whether to do user authentication by default... " >&6; } $as_echo_n "checking whether to do user authentication by default... " >&6; }
# Check whether --enable-authentication was given. # Check whether --enable-authentication was given.
@ -13649,7 +13683,7 @@ $as_echo "no" >&6; }
fi fi
for ac_prog in nroff mandoc for ac_prog in mandoc nroff
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
@ -13692,6 +13726,29 @@ fi
done done
if test -n "$NROFFPROG"; then if test -n "$NROFFPROG"; then
test -n "$MANTYPE" && sudo_cv_var_mantype="$MANTYPE"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which macro set to use for manual pages" >&5
$as_echo_n "checking which macro set to use for manual pages... " >&6; }
if ${sudo_cv_var_mantype+:} false; then :
$as_echo_n "(cached) " >&6
else
sudo_cv_var_mantype="man"
if test "$NROFFPROG" != "no"; then
echo ".Sh NAME" > conftest
echo ".Nm sudo" >> conftest
echo ".Nd sudo" >> conftest
echo ".Sh DESCRIPTION" >> conftest
echo "sudo" >> conftest
if $NROFFPROG -mdoc conftest >/dev/null 2>&1; then
sudo_cv_var_mantype="mdoc"
fi
rm -f conftest
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_mantype" >&5
$as_echo "$sudo_cv_var_mantype" >&6; }
MANTYPE="$sudo_cv_var_mantype"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $NROFFPROG supports the -c option" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $NROFFPROG supports the -c option" >&5
$as_echo_n "checking whether $NROFFPROG supports the -c option... " >&6; } $as_echo_n "checking whether $NROFFPROG supports the -c option... " >&6; }
if ${sudo_cv_var_nroff_opt_c+:} false; then : if ${sudo_cv_var_nroff_opt_c+:} false; then :
@ -13709,7 +13766,7 @@ $as_echo "$sudo_cv_var_nroff_opt_c" >&6; }
if test "$sudo_cv_var_nroff_opt_c" = "yes"; then if test "$sudo_cv_var_nroff_opt_c" = "yes"; then
NROFFPROG="$NROFFPROG -c" NROFFPROG="$NROFFPROG -c"
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $NROFFPROG supports the -Tascii option" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $NROFFPROG supports the -Tascii option" >&5
$as_echo_n "checking whether $NROFFPROG supports the -Tascii option... " >&6; } $as_echo_n "checking whether $NROFFPROG supports the -Tascii option... " >&6; }
if ${sudo_cv_var_nroff_opt_Tascii+:} false; then : if ${sudo_cv_var_nroff_opt_Tascii+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
@ -13719,15 +13776,16 @@ else
else else
sudo_cv_var_nroff_opt_Tascii=no sudo_cv_var_nroff_opt_Tascii=no
fi fi
if test "$sudo_cv_var_nroff_opt_Tascii" = "yes"; then
NROFFPROG="$NROFFPROG -Tascii"
fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_nroff_opt_Tascii" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_nroff_opt_Tascii" >&5
$as_echo "$sudo_cv_var_nroff_opt_Tascii" >&6; } $as_echo "$sudo_cv_var_nroff_opt_Tascii" >&6; }
if test "$sudo_cv_var_nroff_opt_Tascii" = "yes"; then
NROFFPROG="$NROFFPROG -Tascii"
fi
else else
MANTYPE="cat" MANTYPE=cat
MANDIRTYPE=cat
mansrcdir='$(srcdir)' mansrcdir='$(srcdir)'
fi fi

View File

@ -38,6 +38,7 @@ AC_SUBST([GETGROUPS_LIB])
AC_SUBST([OSDEFS]) AC_SUBST([OSDEFS])
AC_SUBST([AUTH_OBJS]) AC_SUBST([AUTH_OBJS])
AC_SUBST([MANTYPE]) AC_SUBST([MANTYPE])
AC_SUBST([MANDIRTYPE])
AC_SUBST([MANCOMPRESS]) AC_SUBST([MANCOMPRESS])
AC_SUBST([MANCOMPRESSEXT]) AC_SUBST([MANCOMPRESSEXT])
AC_SUBST([SHLIB_MODE]) AC_SUBST([SHLIB_MODE])
@ -164,7 +165,7 @@ dnl
INSTALL_NOEXEC= INSTALL_NOEXEC=
devdir='$(srcdir)' devdir='$(srcdir)'
PROGS="sudo" PROGS="sudo"
: ${MANTYPE='man'} : ${MANDIRTYPE='man'}
: ${mansrcdir='.'} : ${mansrcdir='.'}
: ${SHLIB_MODE='0644'} : ${SHLIB_MODE='0644'}
: ${SUDOERS_MODE='0440'} : ${SUDOERS_MODE='0440'}
@ -1112,6 +1113,26 @@ AC_ARG_WITH(plugindir, [AS_HELP_STRING([--with-plugindir], [set directory to loa
*) ;; *) ;;
esac], [with_plugindir="$libexecdir"]) esac], [with_plugindir="$libexecdir"])
AC_ARG_WITH(man, [AS_HELP_STRING([--with-man], [manual pages use man macros])],
[case $with_man in
yes) MANTYPE=man
;;
no) AC_MSG_ERROR(["--without-man not supported."])
;;
*) AC_MSG_ERROR(["ignoring unknown argument to --with-man: $with_man."])
;;
esac])
AC_ARG_WITH(mdoc, [AS_HELP_STRING([--with-mdoc], [manual pages use mdoc macros])],
[case $with_mdoc in
yes) MANTYPE=mdoc
;;
no) AC_MSG_ERROR(["--without-mdoc not supported."])
;;
*) AC_MSG_ERROR(["ignoring unknown argument to --with-mdoc: $with_mdoc."])
;;
esac])
dnl dnl
dnl Options for --enable dnl Options for --enable
dnl dnl
@ -1428,8 +1449,25 @@ dnl Find programs we use
dnl dnl
AC_CHECK_PROG(UNAMEPROG, [uname], [uname]) AC_CHECK_PROG(UNAMEPROG, [uname], [uname])
AC_CHECK_PROG(TRPROG, [tr], [tr]) AC_CHECK_PROG(TRPROG, [tr], [tr])
AC_CHECK_PROGS(NROFFPROG, [nroff mandoc]) AC_CHECK_PROGS(NROFFPROG, [mandoc nroff])
if test -n "$NROFFPROG"; then if test -n "$NROFFPROG"; then
test -n "$MANTYPE" && sudo_cv_var_mantype="$MANTYPE"
AC_CACHE_CHECK([which macro set to use for manual pages],
[sudo_cv_var_mantype],
[sudo_cv_var_mantype="man"
if test "$NROFFPROG" != "no"; then
echo ".Sh NAME" > conftest
echo ".Nm sudo" >> conftest
echo ".Nd sudo" >> conftest
echo ".Sh DESCRIPTION" >> conftest
echo "sudo" >> conftest
if $NROFFPROG -mdoc conftest >/dev/null 2>&1; then
sudo_cv_var_mantype="mdoc"
fi
rm -f conftest
fi]
)
MANTYPE="$sudo_cv_var_mantype"
AC_CACHE_CHECK([whether $NROFFPROG supports the -c option], AC_CACHE_CHECK([whether $NROFFPROG supports the -c option],
[sudo_cv_var_nroff_opt_c], [sudo_cv_var_nroff_opt_c],
[if $NROFFPROG -c </dev/null >/dev/null 2>&1; then [if $NROFFPROG -c </dev/null >/dev/null 2>&1; then
@ -1441,6 +1479,9 @@ if test -n "$NROFFPROG"; then
if test "$sudo_cv_var_nroff_opt_c" = "yes"; then if test "$sudo_cv_var_nroff_opt_c" = "yes"; then
NROFFPROG="$NROFFPROG -c" NROFFPROG="$NROFFPROG -c"
fi fi
dnl
dnl This test will fail for mandoc but it is the default anyway...
dnl
AC_CACHE_CHECK([whether $NROFFPROG supports the -Tascii option], AC_CACHE_CHECK([whether $NROFFPROG supports the -Tascii option],
[sudo_cv_var_nroff_opt_Tascii], [sudo_cv_var_nroff_opt_Tascii],
[if $NROFFPROG -Tascii </dev/null >/dev/null 2>&1; then [if $NROFFPROG -Tascii </dev/null >/dev/null 2>&1; then
@ -1448,12 +1489,13 @@ if test -n "$NROFFPROG"; then
else else
sudo_cv_var_nroff_opt_Tascii=no sudo_cv_var_nroff_opt_Tascii=no
fi] fi]
)
if test "$sudo_cv_var_nroff_opt_Tascii" = "yes"; then if test "$sudo_cv_var_nroff_opt_Tascii" = "yes"; then
NROFFPROG="$NROFFPROG -Tascii" NROFFPROG="$NROFFPROG -Tascii"
fi fi
)
else else
MANTYPE="cat" MANTYPE=cat
MANDIRTYPE=cat
mansrcdir='$(srcdir)' mansrcdir='$(srcdir)'
fi fi
@ -3451,7 +3493,6 @@ test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/
dnl dnl
dnl Substitute into the Makefile and man pages dnl Substitute into the Makefile and man pages
dnl dnl
dnl AC_CONFIG_FILES([doc/sudo.man doc/visudo.man doc/sudoers.man doc/sudoers.ldap.man doc/sudoreplay.man src/Makefile src/sudo_usage.h])
AC_CONFIG_FILES([Makefile common/Makefile compat/Makefile doc/Makefile include/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/sample_group/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers]) AC_CONFIG_FILES([Makefile common/Makefile compat/Makefile doc/Makefile include/Makefile src/sudo_usage.h src/Makefile plugins/sample/Makefile plugins/sample_group/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers])
AC_OUTPUT AC_OUTPUT

View File

@ -48,8 +48,8 @@ mandir = @mandir@
mantype = @MANTYPE@ mantype = @MANTYPE@
mansectsu = @mansectsu@ mansectsu = @mansectsu@
mansectform = @mansectform@ mansectform = @mansectform@
mandirsu = $(mandir)/$(mantype)$(mansectsu) mandirsu = $(mandir)/@MANDIRTYPE@$(mansectsu)
mandirform = $(mandir)/$(mantype)$(mansectform) mandirform = $(mandir)/@MANDIRTYPE@$(mansectform)
# User and group ids the installed files should be "owned" by # User and group ids the installed files should be "owned" by
install_uid = 0 install_uid = 0
@ -62,8 +62,9 @@ DEVEL = @DEVEL@
SHELL = @SHELL@ SHELL = @SHELL@
DOCS = sudo.man visudo.man sudoers.man sudoers.ldap.man sudoers.man \ DOCS = sudo.$(mantype) visudo.$(mantype) sudoers.$(mantype) \
sudoreplay.man sudo_plugin.man sudoers.ldap.$(mantype) sudoers.$(mantype) \
sudoreplay.$(mantype) sudo_plugin.$(mantype)
DEVDOCS = $(srcdir)/sudo.man.in $(srcdir)/sudo.cat \ DEVDOCS = $(srcdir)/sudo.man.in $(srcdir)/sudo.cat \
$(srcdir)/visudo.man.in $(srcdir)/visudo.cat \ $(srcdir)/visudo.man.in $(srcdir)/visudo.cat \
@ -93,116 +94,146 @@ Makefile: $(srcdir)/Makefile.in
varsub: $(top_srcdir)/configure.in varsub: $(top_srcdir)/configure.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
printf 's#@%s@#1#\ns#@%s@#1#\ns#@%s@#1#\ns#@%s@#/etc#g\ns#@%s@#/usr/local#g\ns#@%s@#4#g\ns#@%s@#1m#g\n' SEMAN BAMAN LCMAN sysconfdir prefix mansectform mansectsu > $@; \ printf 's#@%s@#1#\ns#@%s@#1#\ns#@%s@#1#\ns#@%s@#/etc#g\ns#@%s@#/usr/local#g\ns#@%s@#5#g\ns#@%s@#8#g\ns#@%s@#%s#\n' SEMAN BAMAN LCMAN sysconfdir prefix mansectform mansectsu PACKAGE_VERSION $(VERSION) > $@; \
sed -n '/Begin initial values for man page substitution/,/End initial values for man page substitution/{;p;}' $(top_srcdir)/configure.in | sed -e '/^#/d' -e 's/^/s#@/' -e 's/=[\\"]*/@#/' -e 's/[\\"]*$$/#g/' >> $@; \ sed -n '/Begin initial values for man page substitution/,/End initial values for man page substitution/{;p;}' $(top_srcdir)/configure.in | sed -e '/^#/d' -e 's/^/s#@/' -e 's/=[\\"]*/@#/' -e 's/[\\"]*$$/#g/' >> $@; \
fi fi
$(srcdir)/sudo.man.in: $(srcdir)/sudo.pod $(srcdir)/sudo.man.in: $(srcdir)/sudo.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \ mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \
mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \ mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \
sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudo.pod > $@; \ printf '.\\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!\n' > $@; \
pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudo.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" | perl -p $(srcdir)/sudo.man.pl >> $@; \ printf '.\\" IT IS GENERATED AUTOMATICALLY FROM sudo.mdoc.in\n' >> $@; \
sed -n -e '/^.Dd/q' -e '/^\.\\/p' $(srcdir)/sudo.mdoc.in >> $@; \
sed -e 's/^\.Os.*/.Os @PACKAGE_VERSION@/' -e "s/$$mansectsu/8/g" -e "s/$$mansectform/5/g" $(srcdir)/sudo.mdoc.in | mandoc -Tman | sed -e 's/^\(\.TH "SUDO" \)"8"\(.*"\)OpenBSD \(.*\)/\1"'$$mansectsu'"\2\3/' -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" >> $@; \
fi fi
sudo.man: $(srcdir)/sudo.man.in sudo.man: $(srcdir)/sudo.man.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudo.cat: varsub $(srcdir)/sudo.man.in sudo.mdoc: $(srcdir)/sudo.mdoc.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudo.cat: varsub $(srcdir)/sudo.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
sed -f varsub $(srcdir)/sudo.man.in | $(NROFF) -man > $@; \ sed -f varsub $(srcdir)/sudo.mdoc.in | $(NROFF) -mdoc | sed -e 's/ OpenBSD \([^ ].* \)/ \1 /' -e 's/(5)/(4)/g' -e 's/(8)/(1m)/g' > $@; \
fi fi
$(srcdir)/visudo.man.in: $(srcdir)/visudo.pod $(srcdir)/visudo.man.in: $(srcdir)/visudo.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \ mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \
mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \ mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \
sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/visudo.pod > $@; \ printf '.\\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!\n' > $@; \
pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/visudo.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@; \ printf '.\\" IT IS GENERATED AUTOMATICALLY FROM visudo.mdoc.in\n' >> $@; \
sed -n -e '/^.Dd/q' -e '/^\.\\/p' $(srcdir)/visudo.mdoc.in >> $@; \
sed -e 's/^\.Os.*/.Os @PACKAGE_VERSION@/' -e "s/$$mansectsu/8/g" -e "s/$$mansectform/5/g" $(srcdir)/visudo.mdoc.in | mandoc -Tman | sed -e 's/^\(\.TH "VISUDO" \)"8"\(.*"\)OpenBSD \(.*\)/\1"'$$mansectsu'"\2\3/' -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" >> $@; \
fi fi
visudo.man: $(srcdir)/visudo.man.in visudo.man: $(srcdir)/visudo.man.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/visudo.cat: varsub $(srcdir)/visudo.man.in visudo.mdoc: $(srcdir)/visudo.mdoc.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/visudo.cat: varsub $(srcdir)/visudo.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
sed -f varsub $(srcdir)/visudo.man.in | $(NROFF) -man > $@; \ sed -f varsub $(srcdir)/visudo.mdoc.in | $(NROFF) -mdoc | sed -e 's/ OpenBSD \([^ ].* \)/ \1 /' -e 's/(5)/(4)/g' -e 's/(8)/(1m)/g' > $@; \
fi fi
$(srcdir)/sudoers.man.in: $(srcdir)/sudoers.pod $(srcdir)/sudoers.man.in: $(srcdir)/sudoers.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \ mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \
mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \ mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \
sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudoers.pod > $@; \ printf '.\\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!\n' > $@; \
pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudoers.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" | perl -p $(srcdir)/sudoers.man.pl >> $@; \ printf '.\\" IT IS GENERATED AUTOMATICALLY FROM sudoers.mdoc.in\n' >> $@; \
sed -n -e '/^.Dd/q' -e '/^\.\\/p' $(srcdir)/sudoers.mdoc.in >> $@; \
sed -e 's/^\.Os.*/.Os @PACKAGE_VERSION@/' -e "s/$$mansectsu/8/g" -e "s/$$mansectform/5/g" $(srcdir)/sudoers.mdoc.in | mandoc -Tman | sed -e 's/^\(\.TH "SUDOERS" \)"5"\(.*"\)OpenBSD \(.*\)/\1"'$$mansectsu'"\2\3/' -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" >> $@; \
fi fi
sudoers.man: $(srcdir)/sudoers.man.in sudoers.man: $(srcdir)/sudoers.man.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudoers.cat: varsub $(srcdir)/sudoers.man.in sudoers.mdoc: $(srcdir)/sudoers.mdoc.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudoers.cat: varsub $(srcdir)/sudoers.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
sed -f varsub $(srcdir)/sudoers.man.in | $(NROFF) -man > $@; \ sed -f varsub $(srcdir)/sudoers.mdoc.in | $(NROFF) -mdoc | sed -e 's/ OpenBSD \([^ ].* \)/ \1 /' -e 's/(5)/(4)/g' -e 's/(8)/(1m)/g' > $@; \
fi fi
$(srcdir)/sudoers.ldap.man.in: $(srcdir)/sudoers.ldap.pod $(srcdir)/sudoers.ldap.man.in: $(srcdir)/sudoers.ldap.mdoc
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \ mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \
mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \ mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \
sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudoers.ldap.pod > $@; \ printf '.\\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!\n' > $@; \
pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectform --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudoers.ldap.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@; \ printf '.\\" IT IS GENERATED AUTOMATICALLY FROM sudoers.ldap.mdoc.in\n' >> $@; \
sed -n -e '/^.Dd/q' -e '/^\.\\/p' $(srcdir)/sudoers.ldap.mdoc.in >> $@; \
sed -e 's/^\.Os.*/.Os @PACKAGE_VERSION@/' -e "s/$$mansectsu/8/g" -e "s/$$mansectform/5/g" $(srcdir)/sudoers.ldap.mdoc.in | mandoc -Tman | sed -e 's/^\(\.TH "SUDOERS.LDAP" \)"5"\(.*"\)OpenBSD \(.*\)/\1"'$$mansectsu'"\2\3/' -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" >> $@; \
fi fi
sudoers.ldap.man: $(srcdir)/sudoers.ldap.man.in sudoers.ldap.man: $(srcdir)/sudoers.ldap.man.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudoers.ldap.cat: varsub $(srcdir)/sudoers.ldap.man.in sudoers.ldap.mdoc: $(srcdir)/sudoers.ldap.mdoc.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudoers.ldap.cat: varsub $(srcdir)/sudoers.ldap.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
sed -f varsub $(srcdir)/sudoers.ldap.man.in | $(NROFF) -man > $@; \ sed -f varsub $(srcdir)/sudoers.ldap.mdoc.in | $(NROFF) -mdoc | sed -e 's/ OpenBSD \([^ ].* \)/ \1 /' -e 's/(5)/(4)/g' -e 's/(8)/(1m)/g' > $@; \
fi fi
$(srcdir)/sudoreplay.man.in: $(srcdir)/sudoreplay.pod $(srcdir)/sudoreplay.man.in: $(srcdir)/sudoreplay.mdoc
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \ mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \
mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \ mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \
sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudoreplay.pod > $@; \ printf '.\\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!\n' > $@; \
pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudoreplay.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@; \ printf '.\\" IT IS GENERATED AUTOMATICALLY FROM sudoreplay.mdoc.in\n' >> $@; \
sed -n -e '/^.Dd/q' -e '/^\.\\/p' $(srcdir)/sudoreplay.mdoc.in >> $@; \
sed -e 's/^\.Os.*/.Os @PACKAGE_VERSION@/' -e "s/$$mansectsu/8/g" -e "s/$$mansectform/5/g" $(srcdir)/sudoreplay.mdoc.in | mandoc -Tman | sed -e 's/^\(\.TH "SUDOREPLAY" \)"8"\(.*"\)OpenBSD \(.*\)/\1"'$$mansectsu'"\2\3/' -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" >> $@; \
fi fi
sudoreplay.man: $(srcdir)/sudoreplay.man.in sudoreplay.man: $(srcdir)/sudoreplay.man.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudoreplay.cat: varsub $(srcdir)/sudoreplay.man.in sudoreplay.mdoc: $(srcdir)/sudoreplay.mdoc.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudoreplay.cat: varsub $(srcdir)/sudoreplay.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
sed -f varsub $(srcdir)/sudoreplay.man.in | $(NROFF) -man > $@; \ sed -f varsub $(srcdir)/sudoreplay.mdoc.in | $(NROFF) -mdoc | sed -e 's/ OpenBSD \([^ ].* \)/ \1 /' -e 's/(5)/(4)/g' -e 's/(8)/(1m)/g' > $@; \
fi fi
$(srcdir)/sudo_plugin.man.in: $(srcdir)/sudo_plugin.pod $(srcdir)/sudo_plugin.man.in: $(srcdir)/sudo_plugin.mdoc
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \ mansectsu=`echo @MANSECTSU@|tr A-Z a-z`; \
mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \ mansectform=`echo @MANSECTFORM@|tr A-Z a-z`; \
sed -n -e '/^=pod/q' -e 's/^/.\\" /p' $(srcdir)/sudo_plugin.pod > $@; \ printf '.\\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!\n' > $@; \
pod2man --quotes=none --date="`date '+%B %e, %Y'`" --section=$$mansectsu --release=$(VERSION) --center="MAINTENANCE COMMANDS" $(srcdir)/sudo_plugin.pod | sed -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" -e 's|\\fI\\f\((CW*\)*I@\([^@]*\)\\fI@|\\fI@\2@|g' >> $@; \ printf '.\\" IT IS GENERATED AUTOMATICALLY FROM sudo_plugin.mdoc.in\n' >> $@; \
sed -n -e '/^.Dd/q' -e '/^\.\\/p' $(srcdir)/sudo_plugin.mdoc.in >> $@; \
sed -e 's/^\.Os.*/.Os @PACKAGE_VERSION@/' -e "s/$$mansectsu/8/g" -e "s/$$mansectform/5/g" $(srcdir)/sudo_plugin.mdoc.in | mandoc -Tman | sed -e 's/^\(\.TH "SUDO_PLUGIN" \)"8"\(.*"\)OpenBSD \(.*\)/\1"'$$mansectsu'"\2\3/' -e "s/(5)/($$mansectform)/g" -e "s/(8)/($$mansectsu)/g" >> $@; \
fi fi
sudo_plugin.man: $(srcdir)/sudo_plugin.man.in sudo_plugin.man: $(srcdir)/sudo_plugin.man.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@) (cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudo_plugin.cat: varsub $(srcdir)/sudo_plugin.man.in sudo_plugin.mdoc: $(srcdir)/sudo_plugin.mdoc.in
(cd $(top_builddir) && $(SHELL) config.status --file=doc/$@)
$(srcdir)/sudo_plugin.cat: varsub $(srcdir)/sudo_plugin.mdoc.in
@if [ -n "$(DEVEL)" ]; then \ @if [ -n "$(DEVEL)" ]; then \
echo "Generating $@"; \ echo "Generating $@"; \
sed -f varsub $(srcdir)/sudo_plugin.man.in | $(NROFF) -man > $@; \ sed -f varsub $(srcdir)/sudo_plugin.mdoc.in | $(NROFF) -mdoc | sed -e 's/ OpenBSD \([^ ].* \)/ \1 /' -e 's/(5)/(4)/g' -e 's/(8)/(1m)/g' > $@; \
fi fi
CONTRIBUTORS: $(srcdir)/contributors.pod CONTRIBUTORS: $(srcdir)/contributors.pod

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -20,8 +20,8 @@
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\" .\"
.Dd July 10, 2012 .Dd July 10, 2012
.Dt SUDO 8 .Dt SUDO @mansectsu@
.Os .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
.Nm sudo , .Nm sudo ,
.Nm sudoedit .Nm sudoedit
@ -172,7 +172,7 @@ The
policy caches credentials for policy caches credentials for
.Li @timeout@ .Li @timeout@
minutes, unless overridden in minutes, unless overridden in
.Xr sudoers 5 . .Xr sudoers @mansectform@ .
By running By running
.Nm sudo .Nm sudo
with the with the
@ -332,7 +332,7 @@ or
.Ev EDITOR .Ev EDITOR
are set, the first program listed in the are set, the first program listed in the
.Em editor .Em editor
.Xr sudoers 5 .Xr sudoers @mansectform@
option is used. option is used.
.It .It
If they have been modified, the temporary files are copied back to If they have been modified, the temporary files are copied back to
@ -416,7 +416,7 @@ set of variables, similar to what is present when a user logs in.
The The
.Em Command Environment .Em Command Environment
section in the section in the
.Xr sudoers 5 .Xr sudoers @mansectform@
manual documents how the manual documents how the
.Fl i .Fl i
option affects the environment in which a command is run when the option affects the environment in which a command is run when the
@ -523,7 +523,7 @@ expanded to the host name including the domain name (on if the
machine's host name is fully qualified or the machine's host name is fully qualified or the
.Em fqdn .Em fqdn
option is set in option is set in
.Xr sudoers 5 ) .Xr sudoers @mansectform@ )
.It Li %h .It Li %h
expanded to the local host name without the domain name expanded to the local host name without the domain name
.It Li %p .It Li %p
@ -534,7 +534,7 @@ expanded to the name of the user whose password is being requested
and and
.Em runaspw .Em runaspw
flags in flags in
.Xr sudoers 5 ) .Xr sudoers @mansectform@ )
.It Li %U .It Li %U
expanded to the login name of the user the command will be run as expanded to the login name of the user the command will be run as
(defaults to root unless the (defaults to root unless the
@ -687,7 +687,7 @@ tag set or the command matched is
.Li ALL , .Li ALL ,
the user may set variables that would otherwise be forbidden. the user may set variables that would otherwise be forbidden.
See See
.Xr sudoers 5 .Xr sudoers @mansectform@
for more information. for more information.
.Sh PLUGINS .Sh PLUGINS
Plugins are dynamically loaded based on the contents of the Plugins are dynamically loaded based on the contents of the
@ -761,7 +761,7 @@ or
are silently ignored. are silently ignored.
.Pp .Pp
For more information, see the For more information, see the
.Xr sudo_plugin 8 .Xr sudo_plugin @mansectsu@
manual. manual.
.Sh PATHS .Sh PATHS
A A
@ -976,7 +976,7 @@ effective root shell.
For more information, please see the For more information, please see the
.Em PREVENTING SHELL ESCAPES .Em PREVENTING SHELL ESCAPES
section in section in
.Xr sudoers 5 . .Xr sudoers @mansectform@ .
.Pp .Pp
To prevent the disclosure of potentially sensitive information, To prevent the disclosure of potentially sensitive information,
.Nm sudo .Nm sudo
@ -1136,11 +1136,11 @@ $ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
.Xr su 1 , .Xr su 1 ,
.Xr stat 2 , .Xr stat 2 ,
.Xr login_cap 3 , .Xr login_cap 3 ,
.Xr passwd 5 , .Xr passwd @mansectform@ ,
.Xr sudoers 5 , .Xr sudoers @mansectform@ ,
.Xr sudo_plugin 8 , .Xr sudo_plugin @mansectsu@ ,
.Xr sudoreplay 8 , .Xr sudoreplay @mansectsu@ ,
.Xr visudo 8 .Xr visudo @mansectsu@
.Sh HISTORY .Sh HISTORY
See the HISTORY file in the See the HISTORY file in the
.Nm sudo .Nm sudo
@ -1168,7 +1168,7 @@ via shell escapes, thus avoiding
.Nm sudo No Ns 's .Nm sudo No Ns 's
checks. checks.
However, on most systems it is possible to prevent shell escapes with the However, on most systems it is possible to prevent shell escapes with the
.Xr sudoers 5 .Xr sudoers @mansectform@
module's module's
.Em noexec .Em noexec
functionality. functionality.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,8 @@
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.Dd July 16, 2012 .Dd July 16, 2012
.Dt SUDO_PLUGIN 5 .Dt SUDO_PLUGIN @mansectform@
.Os .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
.Nm sudo_plugin .Nm sudo_plugin
.Nd Sudo Plugin API .Nd Sudo Plugin API
@ -2133,8 +2133,8 @@ This can be used to merge in environment variables stored in the PAM
handle before a command is run. handle before a command is run.
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr sudoers 5 , .Xr sudoers @mansectform@ ,
.Xr sudo 8 .Xr sudo @mansectsu@
.Sh BUGS .Sh BUGS
If you feel you have found a bug in If you feel you have found a bug in
.Nm sudo , .Nm sudo ,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,8 @@
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.Dd July 12, 2012 .Dd July 12, 2012
.Dt SUDOERS.LDAP 5 .Dt SUDOERS.LDAP @mansectsu@
.Os .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
.Nm sudoers.ldap .Nm sudoers.ldap
.Nd sudo LDAP configuration .Nd sudo LDAP configuration
@ -412,7 +412,7 @@ parses
.Pa @ldap_conf@ .Pa @ldap_conf@
itself and may support options that differ from those described in the itself and may support options that differ from those described in the
system's system's
.Xr ldap.conf 5 .Xr ldap.conf @mansectsu@
manual. manual.
.Pp .Pp
Also note that on systems using the OpenLDAP libraries, default Also note that on systems using the OpenLDAP libraries, default
@ -753,7 +753,7 @@ with the remote server.
.It Sy DEREF Ar never/searching/finding/always .It Sy DEREF Ar never/searching/finding/always
How alias dereferencing is to be performed when searching. How alias dereferencing is to be performed when searching.
See the See the
.Xr ldap.conf 5 .Xr ldap.conf @mansectsu@
manual for a full description of this option. manual for a full description of this option.
.El .El
.Pp .Pp
@ -1073,8 +1073,8 @@ objectclass ( 1.3.6.1.4.1.15953.9.2.1 NAME 'sudoRole' SUP top STRUCTURAL
) )
.Ed .Ed
.Sh SEE ALSO .Sh SEE ALSO
.Xr ldap.conf 5 , .Xr ldap.conf @mansectsu@ ,
.Xr sudoers 5 .Xr sudoers @mansectsu@
.Sh CAVEATS .Sh CAVEATS
Note that there are differences in the way that LDAP-based Note that there are differences in the way that LDAP-based
.Em sudoers .Em sudoers

File diff suppressed because it is too large Load Diff

View File

@ -20,8 +20,8 @@
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\" .\"
.Dd July 16, 2012 .Dd July 16, 2012
.Dt SUDOERS 5 .Dt SUDOERS @mansectform@
.Os .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
.Nm sudoers .Nm sudoers
.Nd default sudo security policy module .Nd default sudo security policy module
@ -45,7 +45,7 @@ For information on storing
.Em sudoers .Em sudoers
policy information policy information
in LDAP, please see in LDAP, please see
.Xr sudoers.ldap 5 . .Xr sudoers.ldap @mansectform@ .
.Ss Authentication and Logging .Ss Authentication and Logging
The The
.Em sudoers .Em sudoers
@ -1087,7 +1087,7 @@ regular expressions.
.Bl -tag -width 8n .Bl -tag -width 8n
.It Li * .It Li *
Matches any set of zero or more characters. Matches any set of zero or more characters.
.It Li \? .It Li \&?
Matches any single character. Matches any single character.
.It Li [...] .It Li [...]
Matches any character in the specified range. Matches any character in the specified range.
@ -1102,7 +1102,7 @@ evaluates to
.Sq x . .Sq x .
This is used to escape special characters such as: This is used to escape special characters such as:
.Ql * , .Ql * ,
.Ql \? , .Ql \&? ,
.Ql [\& , .Ql [\& ,
and and
.Ql ]\& . .Ql ]\& .
@ -1661,7 +1661,7 @@ The
option may be used to control the format of the session ID. option may be used to control the format of the session ID.
.Pp .Pp
Output logs may be viewed with the Output logs may be viewed with the
.Xr sudoreplay 8 .Xr sudoreplay @mansectsu@
utility, which can also be used to list or search the available logs. utility, which can also be used to list or search the available logs.
.It log_year .It log_year
If set, the four-digit year will be logged in the (non-syslog) If set, the four-digit year will be logged in the (non-syslog)
@ -1820,7 +1820,7 @@ will only run when the user is logged in to a real tty.
When this flag is set, When this flag is set,
.Nm sudo .Nm sudo
can only be run from a login session and not via other means such as can only be run from a login session and not via other means such as
.Xr cron 8 .Xr cron @mansectsu@
or cgi-bin scripts. or cgi-bin scripts.
This flag is This flag is
.Em off .Em off
@ -2432,7 +2432,7 @@ Defaults group_plugin="sample_group.so /etc/sudo-group"
.Ed .Ed
.Pp .Pp
For more information see For more information see
.Xr sudo_plugin 5 . .Xr sudo_plugin @mansectform@ .
.It lecture .It lecture
This option controls when a short lecture will be printed along with This option controls when a short lecture will be printed along with
the password prompt. the password prompt.
@ -2783,7 +2783,7 @@ plugin is doing internally if there is a problem.
This can be configured in the This can be configured in the
.Pa @sysconfdir@/sudo.conf .Pa @sysconfdir@/sudo.conf
file as described in file as described in
.Xr sudo 8 . .Xr sudo @mansectsu@ .
.Pp .Pp
The The
.Em sudoers .Em sudoers
@ -3451,10 +3451,10 @@ available.
.Xr glob 3 , .Xr glob 3 ,
.Xr mktemp 3 , .Xr mktemp 3 ,
.Xr strftime 3 , .Xr strftime 3 ,
.Xr sudoers.ldap 5 , .Xr sudoers.ldap @mansectform@ ,
.Xr sudo_plugin 8 , .Xr sudo_plugin @mansectsu@ ,
.Xr sudo 8 , .Xr sudo @mansectsu@ ,
.Xr visudo 8 .Xr visudo @mansectsu@
.Sh CAVEATS .Sh CAVEATS
The The
.Em sudoers .Em sudoers

View File

@ -1,60 +1,55 @@
SUDOREPLAY(1m) MAINTENANCE COMMANDS SUDOREPLAY(1m) SUDOREPLAY(1m) System Manager's Manual SUDOREPLAY(1m)
NNAAMMEE NNAAMMEE
sudoreplay - replay sudo session logs ssuuddoorreeppllaayy - replay sudo session logs
SSYYNNOOPPSSIISS SSYYNNOOPPSSIISS
ssuuddoorreeppllaayy [--hh] [--dd _d_i_r_e_c_t_o_r_y] [--ff _f_i_l_t_e_r] [--mm _m_a_x___w_a_i_t] ssuuddoorreeppllaayy [--hh] [--dd _d_i_r_e_c_t_o_r_y] [--ff _f_i_l_t_e_r] [--mm _m_a_x___w_a_i_t]
[--ss _s_p_e_e_d___f_a_c_t_o_r] ID [--ss _s_p_e_e_d___f_a_c_t_o_r] ID
ssuuddoorreeppllaayy [--hh] [--dd _d_i_r_e_c_t_o_r_y] -l [search expression] ssuuddoorreeppllaayy [--hh] [--dd _d_i_r_e_c_t_o_r_y] --ll [search expression]
DDEESSCCRRIIPPTTIIOONN DDEESSCCRRIIPPTTIIOONN
ssuuddoorreeppllaayy plays back or lists the output logs created by ssuuddoo. When ssuuddoorreeppllaayy plays back or lists the output logs created by ssuuddoo. When
replaying, ssuuddoorreeppllaayy can play the session back in real-time, or the replaying, ssuuddoorreeppllaayy can play the session back in real-time, or the
playback speed may be adjusted (faster or slower) based on the command playback speed may be adjusted (faster or slower) based on the command
line options. line options.
The _I_D should either be a six character sequence of digits and upper The _I_D should either be a six character sequence of digits and upper case
case letters, e.g. 0100A5, or a pattern matching the _i_o_l_o_g___f_i_l_e option letters, e.g. 0100A5, or a pattern matching the _i_o_l_o_g___f_i_l_e option in the
in the _s_u_d_o_e_r_s file. When a command is run via ssuuddoo with _l_o_g___o_u_t_p_u_t _s_u_d_o_e_r_s file. When a command is run via ssuuddoo with _l_o_g___o_u_t_p_u_t enabled in
enabled in the _s_u_d_o_e_r_s file, a TSID=ID string is logged via syslog or the _s_u_d_o_e_r_s file, a TSID=ID string is logged via syslog or to the ssuuddoo
to the ssuuddoo log file. The _I_D may also be determined using ssuuddoorreeppllaayy's log file. The _I_D may also be determined using ssuuddoorreeppllaayy's list mode.
list mode.
In list mode, ssuuddoorreeppllaayy can be used to find the ID of a session based In list mode, ssuuddoorreeppllaayy can be used to find the ID of a session based on
on a number of criteria such as the user, tty or command run. a number of criteria such as the user, tty or command run.
In replay mode, if the standard output has not been redirected, In replay mode, if the standard output has not been redirected,
ssuuddoorreeppllaayy will act on the following keys: ssuuddoorreeppllaayy will act on the following keys:
' ' (space) ` ' (space) Pause output; press any key to resume.
Pause output; press any key to resume.
'<' Reduce the playback speed by one half. `<' Reduce the playback speed by one half.
'>' Double the playback speed. `>' Double the playback speed.
OOPPTTIIOONNSS OOPPTTIIOONNSS
ssuuddoorreeppllaayy accepts the following command line options: ssuuddoorreeppllaayy accepts the following command line options:
-d _d_i_r_e_c_t_o_r_y --dd _d_i_r_e_c_t_o_r_y Use _d_i_r_e_c_t_o_r_y to for the session logs instead of the
Use _d_i_r_e_c_t_o_r_y to for the session logs instead of the
default, _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o. default, _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o.
-f _f_i_l_t_e_r By default, ssuuddoorreeppllaayy will play back the command's --ff _f_i_l_t_e_r By default, ssuuddoorreeppllaayy will play back the command's
standard output, standard error and tty output. The _-_f standard output, standard error and tty output. The --ff
option can be used to select which of these to output. The option can be used to select which of these to output. The
_f_i_l_t_e_r argument is a comma-separated list, consisting of _f_i_l_t_e_r argument is a comma-separated list, consisting of
one or more of following: _s_t_d_o_u_t, _s_t_d_e_r_r, and _t_t_y_o_u_t. one or more of following: _s_t_d_o_u_t, _s_t_d_e_r_r, and _t_t_y_o_u_t.
-h The --hh (_h_e_l_p) option causes ssuuddoorreeppllaayy to print a short --hh The --hh (_h_e_l_p) option causes ssuuddoorreeppllaayy to print a short
help message to the standard output and exit. help message to the standard output and exit.
-l [_s_e_a_r_c_h _e_x_p_r_e_s_s_i_o_n] --ll [_s_e_a_r_c_h _e_x_p_r_e_s_s_i_o_n]
Enable "list mode". In this mode, ssuuddoorreeppllaayy will list Enable ``list mode''. In this mode, ssuuddoorreeppllaayy will list
available sessions in a format similar to the ssuuddoo log file available sessions in a format similar to the ssuuddoo log file
format, sorted by file name (or sequence number). If a format, sorted by file name (or sequence number). If a
_s_e_a_r_c_h _e_x_p_r_e_s_s_i_o_n is specified, it will be used to restrict _s_e_a_r_c_h _e_x_p_r_e_s_s_i_o_n is specified, it will be used to restrict
@ -75,7 +70,7 @@ OOPPTTIIOONNSS
fromdate _d_a_t_e fromdate _d_a_t_e
Evaluates to true if the command was run on or Evaluates to true if the command was run on or
after _d_a_t_e. See "Date and time format" for a after _d_a_t_e. See _D_a_t_e _a_n_d _t_i_m_e _f_o_r_m_a_t for a
description of supported date and time formats. description of supported date and time formats.
group _r_u_n_a_s___g_r_o_u_p group _r_u_n_a_s___g_r_o_u_p
@ -91,13 +86,13 @@ OOPPTTIIOONNSS
todate _d_a_t_e todate _d_a_t_e
Evaluates to true if the command was run on or Evaluates to true if the command was run on or
prior to _d_a_t_e. See "Date and time format" for a prior to _d_a_t_e. See _D_a_t_e _a_n_d _t_i_m_e _f_o_r_m_a_t for a
description of supported date and time formats. description of supported date and time formats.
tty _t_t_y _n_a_m_e tty _t_t_y _n_a_m_e
Evaluates to true if the command was run on the Evaluates to true if the command was run on the
specified terminal device. The _t_t_y _n_a_m_e should be specified terminal device. The _t_t_y _n_a_m_e should be
specified without the _/_d_e_v_/ prefix, e.g. _t_t_y_0_1 specified without the _/_d_e_v_/ prefix, e.g. _t_t_y_0_1
instead of _/_d_e_v_/_t_t_y_0_1. instead of _/_d_e_v_/_t_t_y_0_1.
user _u_s_e_r _n_a_m_e user _u_s_e_r _n_a_m_e
@ -109,21 +104,21 @@ OOPPTTIIOONNSS
character). character).
Predicates may be combined using _a_n_d, _o_r and _! operators as Predicates may be combined using _a_n_d, _o_r and _! operators as
well as '(' and ')' for grouping (note that parentheses well as `(' and `)' grouping (note that parentheses must
must generally be escaped from the shell). The _a_n_d generally be escaped from the shell). The _a_n_d operator is
operator is optional, adjacent predicates have an implied optional, adjacent predicates have an implied _a_n_d unless
_a_n_d unless separated by an _o_r. separated by an _o_r.
-m _m_a_x___w_a_i_t Specify an upper bound on how long to wait between key --mm _m_a_x___w_a_i_t Specify an upper bound on how long to wait between key
presses or output data. By default, ssuuddoorreeppllaayy will presses or output data. By default, ssuuddoorreeppllaayy will
accurately reproduce the delays between key presses or accurately reproduce the delays between key presses or
program output. However, this can be tedious when the program output. However, this can be tedious when the
session includes long pauses. When the _-_m option is session includes long pauses. When the --mm option is
specified, ssuuddoorreeppllaayy will limit these pauses to at most specified, ssuuddoorreeppllaayy will limit these pauses to at most
_m_a_x___w_a_i_t seconds. The value may be specified as a floating _m_a_x___w_a_i_t seconds. The value may be specified as a floating
point number, e.g. _2_._5. point number, e.g. _2_._5.
-s _s_p_e_e_d___f_a_c_t_o_r --ss _s_p_e_e_d___f_a_c_t_o_r
This option causes ssuuddoorreeppllaayy to adjust the number of This option causes ssuuddoorreeppllaayy to adjust the number of
seconds it will wait between key presses or program output. seconds it will wait between key presses or program output.
This can be used to slow down or speed up the display. For This can be used to slow down or speed up the display. For
@ -131,135 +126,132 @@ OOPPTTIIOONNSS
fast whereas a _s_p_e_e_d___f_a_c_t_o_r of _._5 would make the output fast whereas a _s_p_e_e_d___f_a_c_t_o_r of _._5 would make the output
twice as slow. twice as slow.
-V The --VV (version) option causes ssuuddoorreeppllaayy to print its --VV The --VV (_v_e_r_s_i_o_n) option causes ssuuddoorreeppllaayy to print its
version number and exit. version number and exit.
DDaattee aanndd ttiimmee ffoorrmmaatt DDaattee aanndd ttiimmee ffoorrmmaatt
The time and date may be specified multiple ways, common formats The time and date may be specified multiple ways, common formats include:
include:
HH:MM:SS am MM/DD/CCYY timezone HH:MM:SS am MM/DD/CCYY timezone
24 hour time may be used in place of am/pm. 24 hour time may be used in place of am/pm.
HH:MM:SS am Month, Day Year timezone HH:MM:SS am Month, Day Year timezone
24 hour time may be used in place of am/pm, and month and day 24 hour time may be used in place of am/pm, and month and day
names may be abbreviated. Note that month and day of the week names may be abbreviated. Note that month and day of the week
names must be specified in English. names must be specified in English.
CCYY-MM-DD HH:MM:SS CCYY-MM-DD HH:MM:SS
ISO time format ISO time format
DD Month CCYY HH:MM:SS DD Month CCYY HH:MM:SS
The month name may be abbreviated. The month name may be abbreviated.
Either time or date may be omitted, the am/pm and timezone are Either time or date may be omitted, the am/pm and timezone are optional.
optional. If no date is specified, the current day is assumed; if no If no date is specified, the current day is assumed; if no time is
time is specified, the first second of the specified date is used. The specified, the first second of the specified date is used. The less
less significant parts of both time and date may also be omitted, in significant parts of both time and date may also be omitted, in which
which case zero is assumed. case zero is assumed.
The following are all valid time and date specifications: The following are all valid time and date specifications:
now The current time and date. now The current time and date.
tomorrow tomorrow
Exactly one day from now. Exactly one day from now.
yesterday yesterday
24 hours ago. 24 hours ago.
2 hours ago 2 hours ago
2 hours ago. 2 hours ago.
next Friday next Friday
The first second of the next Friday. The first second of the next Friday.
this week this week
The current time but the first day of the coming week. The current time but the first day of the coming week.
a fortnight ago a fortnight ago
The current time but 14 days ago. The current time but 14 days ago.
10:01 am 9/17/2009 10:01 am 9/17/2009
10:01 am, September 17, 2009. 10:01 am, September 17, 2009.
10:01 am 10:01 am
10:01 am on the current day. 10:01 am on the current day.
10 10:00 am on the current day. 10 10:00 am on the current day.
9/17/2009 9/17/2009
00:00 am, September 17, 2009. 00:00 am, September 17, 2009.
10:01 am Sep 17, 2009 10:01 am Sep 17, 2009
10:01 am, September 17, 2009. 10:01 am, September 17, 2009.
FFIILLEESS FFIILLEESS
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o The default I/O log directory. _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o The default I/O log directory.
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_l_o_g _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_l_o_g
Example session log info. Example session log info.
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_s_t_d_i_n _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_s_t_d_i_n
Example session standard input log. Example session standard input log.
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_s_t_d_o_u_t _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_s_t_d_o_u_t
Example session standard output log. Example session standard output log.
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_s_t_d_e_r_r _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_s_t_d_e_r_r
Example session standard error log. Example session standard error log.
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_t_t_y_i_n _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_t_t_y_i_n
Example session tty input file. Example session tty input file.
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_t_t_y_o_u_t _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_t_t_y_o_u_t
Example session tty output file. Example session tty output file.
_/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_t_i_m_i_n_g _/_v_a_r_/_l_o_g_/_s_u_d_o_-_i_o_/_0_0_/_0_0_/_0_1_/_t_i_m_i_n_g
Example session timing file. Example session timing file.
Note that the _s_t_d_i_n, _s_t_d_o_u_t and _s_t_d_e_r_r files will be empty unless ssuuddoo Note that the _s_t_d_i_n, _s_t_d_o_u_t and _s_t_d_e_r_r files will be empty unless ssuuddoo
was used as part of a pipeline for a particular command. was used as part of a pipeline for a particular command.
EEXXAAMMPPLLEESS EEXXAAMMPPLLEESS
List sessions run by user _m_i_l_l_e_r_t: List sessions run by user _m_i_l_l_e_r_t:
# sudoreplay -l user millert # sudoreplay -l user millert
List sessions run by user _b_o_b with a command containing the string vi: List sessions run by user _b_o_b with a command containing the string vi:
# sudoreplay -l user bob command vi # sudoreplay -l user bob command vi
List sessions run by user _j_e_f_f that match a regular expression: List sessions run by user _j_e_f_f that match a regular expression:
# sudoreplay -l user jeff command '/bin/[a-z]*sh' # sudoreplay -l user jeff command '/bin/[a-z]*sh'
List sessions run by jeff or bob on the console: List sessions run by jeff or bob on the console:
# sudoreplay -l ( user jeff or user bob ) tty console # sudoreplay -l ( user jeff or user bob ) tty console
SSEEEE AALLSSOO SSEEEE AALLSSOO
_s_u_d_o(1m), _s_c_r_i_p_t(1) sudo(1m), script(1)
AAUUTTHHOORRSS AAUUTTHHOORRSS
Todd C. Miller Todd C. Miller
BBUUGGSS BBUUGGSS
If you feel you have found a bug in ssuuddoorreeppllaayy, please submit a bug If you feel you have found a bug in ssuuddoorreeppllaayy, please submit a bug
report at http://www.sudo.ws/sudo/bugs/ report at http://www.sudo.ws/sudo/bugs/
SSUUPPPPOORRTT SSUUPPPPOORRTT
Limited free support is available via the sudo-users mailing list, see Limited free support is available via the sudo-users mailing list, see
http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search the
the archives. archives.
DDIISSCCLLAAIIMMEERR DDIISSCCLLAAIIMMEERR
ssuuddoorreeppllaayy is provided ``AS IS'' and any express or implied warranties, ssuuddoorreeppllaayy is provided ``AS IS'' and any express or implied warranties,
including, but not limited to, the implied warranties of including, but not limited to, the implied warranties of merchantability
merchantability and fitness for a particular purpose are disclaimed. and fitness for a particular purpose are disclaimed. See the LICENSE
See the LICENSE file distributed with ssuuddoo or file distributed with ssuuddoo or http://www.sudo.ws/sudo/license.html for
http://www.sudo.ws/sudo/license.html for complete details. complete details.
Sudo 1.8.6 July 12, 2012 Sudo 1.8.6
1.8.6 July 17, 2012 SUDOREPLAY(1m)

View File

@ -1,4 +1,7 @@
.\" Copyright (c) 2009-2011 Todd C. Miller <Todd.Miller@courtesan.com> .\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!
.\" IT IS GENERATED AUTOMATICALLY FROM sudoreplay.mdoc.in
.\"
.\" Copyright (c) 2009-2012 Todd C. Miller <Todd.Miller@courtesan.com>
.\" .\"
.\" Permission to use, copy, modify, and distribute this software for any .\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above .\" purpose with or without fee is hereby granted, provided that the above
@ -13,408 +16,398 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) .TH "SUDOREPLAY" "@mansectsu@" "July 12, 2012" "1.8.6" "System Manager's Manual"
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C`
. ds C'
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "SUDOREPLAY @mansectsu@"
.TH SUDOREPLAY @mansectsu@ "July 17, 2012" "1.8.6" "MAINTENANCE COMMANDS"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME" .SH "NAME"
sudoreplay \- replay sudo session logs \fBsudoreplay\fR
\- replay sudo session logs
.SH "SYNOPSIS" .SH "SYNOPSIS"
.IX Header "SYNOPSIS" .HP 11n
\&\fBsudoreplay\fR [\fB\-h\fR] [\fB\-d\fR\ \fIdirectory\fR] [\fB\-f\fR\ \fIfilter\fR] [\fB\-m\fR\ \fImax_wait\fR] [\fB\-s\fR\ \fIspeed_factor\fR] \s-1ID\s0 \fBsudoreplay\fR
.PP [\fB-h\fR]
\&\fBsudoreplay\fR [\fB\-h\fR] [\fB\-d\fR\ \fIdirectory\fR] \-l [search\ expression] [\fB-d\fR\~\fIdirectory\fR]
[\fB-f\fR\~\fIfilter\fR]
[\fB-m\fR\~\fImax_wait\fR]
[\fB-s\fR\~\fIspeed_factor\fR]
ID
.HP 11n
\fBsudoreplay\fR
[\fB-h\fR]
[\fB-d\fR\~\fIdirectory\fR]
\fB-l\fR
[search expression]
.SH "DESCRIPTION" .SH "DESCRIPTION"
.IX Header "DESCRIPTION" \fBsudoreplay\fR
\&\fBsudoreplay\fR plays back or lists the output logs created by \fBsudo\fR. plays back or lists the output logs created by
When replaying, \fBsudoreplay\fR can play the session back in real-time, \fBsudo\fR.
or the playback speed may be adjusted (faster or slower) based on When replaying,
the command line options. \fBsudoreplay\fR
can play the session back in real-time, or the playback speed may be
adjusted (faster or slower) based on the command line options.
.PP .PP
The \fI\s-1ID\s0\fR should either be a six character sequence of digits and The
upper case letters, e.g. \f(CW\*(C`0100A5\*(C'\fR, or a pattern matching the \fIID\fR
\&\fIiolog_file\fR option in the \fIsudoers\fR file. When a command is run should either be a six character sequence of digits and
via \fBsudo\fR with \fIlog_output\fR enabled in the \fIsudoers\fR file, a upper case letters, e.g.\&
\&\f(CW\*(C`TSID=ID\*(C'\fR string is logged via syslog or to the \fBsudo\fR log file. \fR0100A5\fR,
The \fI\s-1ID\s0\fR may also be determined using \fBsudoreplay\fR's list mode. or a pattern matching the
\fIiolog_file\fR
option in the
\fIsudoers\fR
file.
When a command is run via
\fBsudo\fR
with
\fIlog_output\fR
enabled in the
\fIsudoers\fR
file, a
\fRTSID=ID\fR
string is logged via syslog or to the
\fBsudo\fR
log file.
The
\fIID\fR
may also be determined using
\fBsudoreplay\fR's
list mode.
.PP .PP
In list mode, \fBsudoreplay\fR can be used to find the \s-1ID\s0 of a session In list mode,
based on a number of criteria such as the user, tty or command run. \fBsudoreplay\fR
can be used to find the ID of a session based on a number of criteria
such as the user, tty or command run.
.PP .PP
In replay mode, if the standard output has not been redirected, In replay mode, if the standard output has not been redirected,
\&\fBsudoreplay\fR will act on the following keys: \fBsudoreplay\fR
.IP "' ' (space)" 8 will act on the following keys:
.IX Item "' ' (space)" .TP 14n
`\fR\ \fR' (space)
Pause output; press any key to resume. Pause output; press any key to resume.
.IP "'<'" 8 .TP 14n
`<'
Reduce the playback speed by one half. Reduce the playback speed by one half.
.IP "'>'" 8 .TP 14n
`>'
Double the playback speed. Double the playback speed.
.SH "OPTIONS" .SH "OPTIONS"
.IX Header "OPTIONS" \fBsudoreplay\fR
\&\fBsudoreplay\fR accepts the following command line options: accepts the following command line options:
.IP "\-d \fIdirectory\fR" 12 .TP 14n
.IX Item "-d directory" \fB-d\fR \fIdirectory\fR
Use \fIdirectory\fR to for the session logs instead of the default, Use
\&\fI@iolog_dir@\fR. \fIdirectory\fR
.IP "\-f \fIfilter\fR" 12 to for the session logs instead of the default,
.IX Item "-f filter" \fI@iolog_dir@\fR.
By default, \fBsudoreplay\fR will play back the command's standard .TP 14n
output, standard error and tty output. The \fI\-f\fR option can be \fB-f\fR \fIfilter\fR
used to select which of these to output. The \fIfilter\fR argument By default,
is a comma-separated list, consisting of one or more of following: \fBsudoreplay\fR
\&\fIstdout\fR, \fIstderr\fR, and \fIttyout\fR. will play back the command's standard output, standard error and tty output.
.IP "\-h" 12 The
.IX Item "-h" \fB-f\fR
The \fB\-h\fR (\fIhelp\fR) option causes \fBsudoreplay\fR to print a short option can be used to select which of these to output.
help message to the standard output and exit. The
.IP "\-l [\fIsearch expression\fR]" 12 \fIfilter\fR
.IX Item "-l [search expression]" argument is a comma-separated list, consisting of one or more of following:
Enable \*(L"list mode\*(R". In this mode, \fBsudoreplay\fR will list available \fIstdout\fR,
sessions in a format similar to the \fBsudo\fR log file format, sorted \fIstderr\fR,
by file name (or sequence number). If a \fIsearch expression\fR is and
specified, it will be used to restrict the IDs that are displayed. \fIttyout\fR.
.TP 14n
\fB-h\fR
The
\fB-h\fR (\fIhelp\fR)
option causes
\fBsudoreplay\fR
to print a short help message to the standard output and exit.
.TP 14n
\fB-l\fR [\fIsearch expression\fR]
Enable
``list mode''.
In this mode,
\fBsudoreplay\fR
will list available sessions in a format similar to the
\fBsudo\fR
log file format, sorted by file name (or sequence number).
If a
\fIsearch expression\fR
is specified, it will be used to restrict the IDs that are displayed.
An expression is composed of the following predicates: An expression is composed of the following predicates:
.RS 12 .RS
.IP "command \fIpattern\fR" 8 .TP 8n
.IX Item "command pattern" command \fIpattern\fR
Evaluates to true if the command run matches \fIpattern\fR. Evaluates to true if the command run matches
On systems with \s-1POSIX\s0 regular expression support, the pattern may \fIpattern\fR.
be an extended regular expression. On systems without \s-1POSIX\s0 regular On systems with POSIX regular expression support, the pattern may
expression support, a simple substring match is performed instead. be an extended regular expression.
.IP "cwd \fIdirectory\fR" 8 On systems without POSIX regular expression support, a simple substring
.IX Item "cwd directory" match is performed instead.
.TP 8n
cwd \fIdirectory\fR
Evaluates to true if the command was run with the specified current Evaluates to true if the command was run with the specified current
working directory. working directory.
.IP "fromdate \fIdate\fR" 8 .TP 8n
.IX Item "fromdate date" fromdate \fIdate\fR
Evaluates to true if the command was run on or after \fIdate\fR. Evaluates to true if the command was run on or after
See \*(L"Date and time format\*(R" for a description of supported \fIdate\fR.
date and time formats. See
.IP "group \fIrunas_group\fR" 8 \fIDate and time format\fR
.IX Item "group runas_group" for a description of supported date and time formats.
.TP 8n
group \fIrunas_group\fR
Evaluates to true if the command was run with the specified Evaluates to true if the command was run with the specified
\&\fIrunas_group\fR. Note that unless a \fIrunas_group\fR was explicitly \fIrunas_group\fR.
specified when \fBsudo\fR was run this field will be empty in the log. Note that unless a
.IP "runas \fIrunas_user\fR" 8 \fIrunas_group\fR
.IX Item "runas runas_user" was explicitly specified when
Evaluates to true if the command was run as the specified \fIrunas_user\fR. \fBsudo\fR
Note that \fBsudo\fR runs commands as user \fIroot\fR by default. was run this field will be empty in the log.
.IP "todate \fIdate\fR" 8 .TP 8n
.IX Item "todate date" runas \fIrunas_user\fR
Evaluates to true if the command was run on or prior to \fIdate\fR. Evaluates to true if the command was run as the specified
See \*(L"Date and time format\*(R" for a description of supported \fIrunas_user\fR.
date and time formats. Note that
.IP "tty \fItty name\fR" 8 \fBsudo\fR
.IX Item "tty tty name" runs commands as user
Evaluates to true if the command was run on the specified terminal \fIroot\fR
device. The \fItty name\fR should be specified without the \fI/dev/\fR prefix, by default.
e.g. \fItty01\fR instead of \fI/dev/tty01\fR. .TP 8n
.IP "user \fIuser name\fR" 8 todate \fIdate\fR
.IX Item "user user name" Evaluates to true if the command was run on or prior to
Evaluates to true if the \s-1ID\s0 matches a command run by \fIuser name\fR. \fIdate\fR.
See
\fIDate and time format\fR
for a description of supported date and time formats.
.TP 8n
tty \fItty name\fR
Evaluates to true if the command was run on the specified terminal device.
The
\fItty name\fR
should be specified without the
\fI/dev/\fR
prefix, e.g.\&
\fItty01\fR
instead of
\fI/dev/tty01\fR.
.TP 8n
user \fIuser name\fR
Evaluates to true if the ID matches a command run by
\fIuser name\fR.
.RE .RE
.RS 12 .RS
.Sp .PP
Predicates may be abbreviated to the shortest unique string (currently Predicates may be abbreviated to the shortest unique string (currently
all predicates may be shortened to a single character). all predicates may be shortened to a single character).
.Sp .sp
Predicates may be combined using \fIand\fR, \fIor\fR and \fI!\fR operators Predicates may be combined using
as well as \f(CW\*(Aq(\*(Aq\fR and \f(CW\*(Aq)\*(Aq\fR for grouping (note that parentheses \fIand\fR,
must generally be escaped from the shell). The \fIand\fR operator is \fIor\fR
optional, adjacent predicates have an implied \fIand\fR unless separated and
by an \fIor\fR. \fI\&!\fR
operators as well as
`\&('
and
`\&)'
grouping (note that parentheses must generally be escaped from the shell).
The
\fIand\fR
operator is optional, adjacent predicates have an implied
\fIand\fR
unless separated by an
\fIor\fR.
.PP
.RE .RE
.IP "\-m \fImax_wait\fR" 12 .sp -1v
.IX Item "-m max_wait" .TP 14n
Specify an upper bound on how long to wait between key presses or \fB-m\fR \fImax_wait\fR
output data. By default, \fBsudoreplay\fR will accurately reproduce Specify an upper bound on how long to wait between key presses or output data.
the delays between key presses or program output. However, this By default,
can be tedious when the session includes long pauses. When the \fBsudoreplay\fR
\&\fI\-m\fR option is specified, \fBsudoreplay\fR will limit these pauses will accurately reproduce the delays between key presses or program output.
to at most \fImax_wait\fR seconds. The value may be specified as a However, this can be tedious when the session includes long pauses.
floating point number, e.g. \fI2.5\fR. When the
.IP "\-s \fIspeed_factor\fR" 12 \fB-m\fR
.IX Item "-s speed_factor" option is specified,
This option causes \fBsudoreplay\fR to adjust the number of seconds \fBsudoreplay\fR
it will wait between key presses or program output. This can be will limit these pauses to at most
used to slow down or speed up the display. For example, a \fImax_wait\fR
\&\fIspeed_factor\fR of \fI2\fR would make the output twice as fast whereas seconds.
a \fIspeed_factor\fR of \fI.5\fR would make the output twice as slow. The value may be specified as a floating point number, e.g.\&
.IP "\-V" 12 \fI2.5\fR.
.IX Item "-V" .TP 14n
The \fB\-V\fR (version) option causes \fBsudoreplay\fR to print its version number \fB-s\fR \fIspeed_factor\fR
This option causes
\fBsudoreplay\fR
to adjust the number of seconds it will wait between key presses or
program output.
This can be used to slow down or speed up the display.
For example, a
\fIspeed_factor\fR
of
\fI2\fR
would make the output twice as fast whereas a
\fIspeed_factor\fR
of
\fI.5\fR
would make the output twice as slow.
.TP 14n
\fB-V\fR
The
\fB-V\fR (\fIversion\fR)
option causes
\fBsudoreplay\fR
to print its version number
and exit. and exit.
.SS "Date and time format" .SS "Date and time format"
.IX Subsection "Date and time format"
The time and date may be specified multiple ways, common formats include: The time and date may be specified multiple ways, common formats include:
.IP "\s-1HH:MM:SS\s0 am \s-1MM/DD/CCYY\s0 timezone" 8 .TP 8n
.IX Item "HH:MM:SS am MM/DD/CCYY timezone" HH:MM:SS am MM/DD/CCYY timezone
24 hour time may be used in place of am/pm. 24 hour time may be used in place of am/pm.
.IP "\s-1HH:MM:SS\s0 am Month, Day Year timezone" 8 .TP 8n
.IX Item "HH:MM:SS am Month, Day Year timezone" HH:MM:SS am Month, Day Year timezone
24 hour time may be used in place of am/pm, and month and day names 24 hour time may be used in place of am/pm, and month and day names
may be abbreviated. Note that month and day of the week names must may be abbreviated.
be specified in English. Note that month and day of the week names must be specified in English.
.IP "CCYY-MM-DD \s-1HH:MM:SS\s0" 8 .TP 8n
.IX Item "CCYY-MM-DD HH:MM:SS" CCYY-MM-DD HH:MM:SS
\&\s-1ISO\s0 time format ISO time format
.IP "\s-1DD\s0 Month \s-1CCYY\s0 \s-1HH:MM:SS\s0" 8 .TP 8n
.IX Item "DD Month CCYY HH:MM:SS" DD Month CCYY HH:MM:SS
The month name may be abbreviated. The month name may be abbreviated.
.PP .PP
Either time or date may be omitted, the am/pm and timezone are Either time or date may be omitted, the am/pm and timezone are optional.
optional. If no date is specified, the current day is assumed; if If no date is specified, the current day is assumed; if no time is
no time is specified, the first second of the specified date is specified, the first second of the specified date is used.
used. The less significant parts of both time and date may also The less significant parts of both time and date may also be omitted,
be omitted, in which case zero is assumed. in which case zero is assumed.
.PP .PP
The following are all valid time and date specifications: The following are all valid time and date specifications:
.IP "now" 8 .TP 8n
.IX Item "now" now
The current time and date. The current time and date.
.IP "tomorrow" 8 .TP 8n
.IX Item "tomorrow" tomorrow
Exactly one day from now. Exactly one day from now.
.IP "yesterday" 8 .TP 8n
.IX Item "yesterday" yesterday
24 hours ago. 24 hours ago.
.IP "2 hours ago" 8 .TP 8n
.IX Item "2 hours ago" 2 hours ago
2 hours ago. 2 hours ago.
.IP "next Friday" 8 .TP 8n
.IX Item "next Friday" next Friday
The first second of the next Friday. The first second of the next Friday.
.IP "this week" 8 .TP 8n
.IX Item "this week" this week
The current time but the first day of the coming week. The current time but the first day of the coming week.
.IP "a fortnight ago" 8 .TP 8n
.IX Item "a fortnight ago" a fortnight ago
The current time but 14 days ago. The current time but 14 days ago.
.IP "10:01 am 9/17/2009" 8 .TP 8n
.IX Item "10:01 am 9/17/2009" 10:01 am 9/17/2009
10:01 am, September 17, 2009. 10:01 am, September 17, 2009.
.IP "10:01 am" 8 .TP 8n
.IX Item "10:01 am" 10:01 am
10:01 am on the current day. 10:01 am on the current day.
.IP "10" 8 .TP 8n
.IX Item "10" 10
10:00 am on the current day. 10:00 am on the current day.
.IP "9/17/2009" 8 .TP 8n
.IX Item "9/17/2009" 9/17/2009
00:00 am, September 17, 2009. 00:00 am, September 17, 2009.
.IP "10:01 am Sep 17, 2009" 8 .TP 8n
.IX Item "10:01 am Sep 17, 2009" 10:01 am Sep 17, 2009
10:01 am, September 17, 2009. 10:01 am, September 17, 2009.
.SH "FILES" .SH "FILES"
.IX Header "FILES" .TP 26n
.ie n .IP "\fI@iolog_dir@\fR" 24 \fI@iolog_dir@\fR
.el .IP "\fI@iolog_dir@\fR" 24
.IX Item "@iolog_dir@"
The default I/O log directory. The default I/O log directory.
.ie n .IP "\fI@iolog_dir@/00/00/01/log\fR" 24 .TP 26n
.el .IP "\fI@iolog_dir@/00/00/01/log\fR" 24 \fI@iolog_dir@/00/00/01/log\fR
.IX Item "@iolog_dir@/00/00/01/log"
Example session log info. Example session log info.
.ie n .IP "\fI@iolog_dir@/00/00/01/stdin\fR" 24 .TP 26n
.el .IP "\fI@iolog_dir@/00/00/01/stdin\fR" 24 \fI@iolog_dir@/00/00/01/stdin\fR
.IX Item "@iolog_dir@/00/00/01/stdin"
Example session standard input log. Example session standard input log.
.ie n .IP "\fI@iolog_dir@/00/00/01/stdout\fR" 24 .TP 26n
.el .IP "\fI@iolog_dir@/00/00/01/stdout\fR" 24 \fI@iolog_dir@/00/00/01/stdout\fR
.IX Item "@iolog_dir@/00/00/01/stdout"
Example session standard output log. Example session standard output log.
.ie n .IP "\fI@iolog_dir@/00/00/01/stderr\fR" 24 .TP 26n
.el .IP "\fI@iolog_dir@/00/00/01/stderr\fR" 24 \fI@iolog_dir@/00/00/01/stderr\fR
.IX Item "@iolog_dir@/00/00/01/stderr"
Example session standard error log. Example session standard error log.
.ie n .IP "\fI@iolog_dir@/00/00/01/ttyin\fR" 24 .TP 26n
.el .IP "\fI@iolog_dir@/00/00/01/ttyin\fR" 24 \fI@iolog_dir@/00/00/01/ttyin\fR
.IX Item "@iolog_dir@/00/00/01/ttyin"
Example session tty input file. Example session tty input file.
.ie n .IP "\fI@iolog_dir@/00/00/01/ttyout\fR" 24 .TP 26n
.el .IP "\fI@iolog_dir@/00/00/01/ttyout\fR" 24 \fI@iolog_dir@/00/00/01/ttyout\fR
.IX Item "@iolog_dir@/00/00/01/ttyout"
Example session tty output file. Example session tty output file.
.ie n .IP "\fI@iolog_dir@/00/00/01/timing\fR" 24 .TP 26n
.el .IP "\fI@iolog_dir@/00/00/01/timing\fR" 24 \fI@iolog_dir@/00/00/01/timing\fR
.IX Item "@iolog_dir@/00/00/01/timing"
Example session timing file. Example session timing file.
.PP .PP
Note that the \fIstdin\fR, \fIstdout\fR and \fIstderr\fR files will be empty Note that the
unless \fBsudo\fR was used as part of a pipeline for a particular \fIstdin\fR,
command. \fIstdout\fR
and
\fIstderr\fR
files will be empty unless
\fBsudo\fR
was used as part of a pipeline for a particular command.
.SH "EXAMPLES" .SH "EXAMPLES"
.IX Header "EXAMPLES" List sessions run by user
List sessions run by user \fImillert\fR: \fImillert\fR:
.nf
.sp
.RS 6n
# sudoreplay -l user millert
.RE
.fi
.PP .PP
.Vb 1 List sessions run by user
\& # sudoreplay \-l user millert \fIbob\fR
.Ve with a command containing the string vi:
.nf
.sp
.RS 6n
# sudoreplay -l user bob command vi
.RE
.fi
.PP .PP
List sessions run by user \fIbob\fR with a command containing the string vi: List sessions run by user
.PP \fIjeff\fR
.Vb 1 that match a regular expression:
\& # sudoreplay \-l user bob command vi .nf
.Ve .sp
.PP .RS 6n
List sessions run by user \fIjeff\fR that match a regular expression: # sudoreplay -l user jeff command '/bin/[a-z]*sh'
.PP .RE
.Vb 1 .fi
\& # sudoreplay \-l user jeff command \*(Aq/bin/[a\-z]*sh\*(Aq
.Ve
.PP .PP
List sessions run by jeff or bob on the console: List sessions run by jeff or bob on the console:
.PP .nf
.Vb 1 .sp
\& # sudoreplay \-l ( user jeff or user bob ) tty console .RS 6n
.Ve # sudoreplay -l ( user jeff or user bob ) tty console
.RE
.fi
.SH "SEE ALSO" .SH "SEE ALSO"
.IX Header "SEE ALSO" sudo(@mansectsu@),
\&\fIsudo\fR\|(@mansectsu@), \fIscript\fR\|(1) script(1)
.SH "AUTHORS" .SH "AUTHORS"
.IX Header "AUTHORS"
Todd C. Miller Todd C. Miller
.SH "BUGS" .SH "BUGS"
.IX Header "BUGS" If you feel you have found a bug in
If you feel you have found a bug in \fBsudoreplay\fR, please submit a bug report \fBsudoreplay\fR,
at http://www.sudo.ws/sudo/bugs/ please submit a bug report at http://www.sudo.ws/sudo/bugs/
.SH "SUPPORT" .SH "SUPPORT"
.IX Header "SUPPORT"
Limited free support is available via the sudo-users mailing list, Limited free support is available via the sudo-users mailing list,
see http://www.sudo.ws/mailman/listinfo/sudo\-users to subscribe or see http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
search the archives. search the archives.
.SH "DISCLAIMER" .SH "DISCLAIMER"
.IX Header "DISCLAIMER" \fBsudoreplay\fR
\&\fBsudoreplay\fR is provided ``\s-1AS\s0 \s-1IS\s0'' and any express or implied warranties, is provided
including, but not limited to, the implied warranties of merchantability ``AS IS''
and fitness for a particular purpose are disclaimed. See the \s-1LICENSE\s0 and any express or implied warranties, including, but not limited
file distributed with \fBsudo\fR or http://www.sudo.ws/sudo/license.html to, the implied warranties of merchantability and fitness for a
for complete details. particular purpose are disclaimed.
See the LICENSE file distributed with
\fBsudo\fR
or http://www.sudo.ws/sudo/license.html for complete details.

View File

@ -15,8 +15,8 @@
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.Dd July 12, 2012 .Dd July 12, 2012
.Dt SUDOREPLAY 8 .Dt SUDOREPLAY @mansectsu@
.Os .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
.Nm sudoreplay .Nm sudoreplay
.Nd replay sudo session logs .Nd replay sudo session logs
@ -350,7 +350,7 @@ List sessions run by jeff or bob on the console:
# sudoreplay -l ( user jeff or user bob ) tty console # sudoreplay -l ( user jeff or user bob ) tty console
.Ed .Ed
.Sh SEE ALSO .Sh SEE ALSO
.Xr sudo 8 , .Xr sudo @mansectsu@ ,
.Xr script 1 .Xr script 1
.Sh AUTHORS .Sh AUTHORS
Todd C. Miller Todd C. Miller

View File

@ -1,154 +1,149 @@
VISUDO(1m) MAINTENANCE COMMANDS VISUDO(1m) VISUDO(1m) System Manager's Manual VISUDO(1m)
NNAAMMEE NNAAMMEE
visudo - edit the sudoers file vviissuuddoo - edit the sudoers file
SSYYNNOOPPSSIISS SSYYNNOOPPSSIISS
vviissuuddoo [--cchhqqssVV] [--ff _s_u_d_o_e_r_s] vviissuuddoo [--cchhqqssVV] [--ff _s_u_d_o_e_r_s]
DDEESSCCRRIIPPTTIIOONN DDEESSCCRRIIPPTTIIOONN
vviissuuddoo edits the _s_u_d_o_e_r_s file in a safe fashion, analogous to _v_i_p_w(1m). vviissuuddoo edits the _s_u_d_o_e_r_s file in a safe fashion, analogous to vipw(1m).
vviissuuddoo locks the _s_u_d_o_e_r_s file against multiple simultaneous edits, vviissuuddoo locks the _s_u_d_o_e_r_s file against multiple simultaneous edits,
provides basic sanity checks, and checks for parse errors. If the provides basic sanity checks, and checks for parse errors. If the
_s_u_d_o_e_r_s file is currently being edited you will receive a message to _s_u_d_o_e_r_s file is currently being edited you will receive a message to try
try again later. again later.
There is a hard-coded list of one or more editors that vviissuuddoo will use There is a hard-coded list of one or more editors that vviissuuddoo will use
set at compile-time that may be overridden via the _e_d_i_t_o_r _s_u_d_o_e_r_s set at compile-time that may be overridden via the _e_d_i_t_o_r _s_u_d_o_e_r_s Default
Default variable. This list defaults to "vi". Normally, vviissuuddoo does variable. This list defaults to vi. Normally, vviissuuddoo does not honor the
not honor the VISUAL or EDITOR environment variables unless they VISUAL or EDITOR environment variables unless they contain an editor in
contain an editor in the aforementioned editors list. However, if the aforementioned editors list. However, if vviissuuddoo is configured with
vviissuuddoo is configured with the _-_-_w_i_t_h_-_e_n_v_-_e_d_i_t_o_r option or the the --with-env-editor option or the _e_n_v___e_d_i_t_o_r Default variable is set in
_e_n_v___e_d_i_t_o_r Default variable is set in _s_u_d_o_e_r_s, vviissuuddoo will use any the _s_u_d_o_e_r_s, vviissuuddoo will use any the editor defines by VISUAL or EDITOR.
editor defines by VISUAL or EDITOR. Note that this can be a security Note that this can be a security hole since it allows the user to execute
hole since it allows the user to execute any program they wish simply any program they wish simply by setting VISUAL or EDITOR.
by setting VISUAL or EDITOR.
vviissuuddoo parses the _s_u_d_o_e_r_s file after the edit and will not save the vviissuuddoo parses the _s_u_d_o_e_r_s file after the edit and will not save the
changes if there is a syntax error. Upon finding an error, vviissuuddoo will changes if there is a syntax error. Upon finding an error, vviissuuddoo will
print a message stating the line number(s) where the error occurred and print a message stating the line number(s) where the error occurred and
the user will receive the "What now?" prompt. At this point the user the user will receive the ``What now?'' prompt. At this point the user
may enter "e" to re-edit the _s_u_d_o_e_r_s file, "x" to exit without saving may enter `e' to re-edit the _s_u_d_o_e_r_s file, `x' to exit without saving the
the changes, or "Q" to quit and save changes. The "Q" option should be changes, or `Q' to quit and save changes. The `Q' option should be used
used with extreme care because if vviissuuddoo believes there to be a parse with extreme care because if vviissuuddoo believes there to be a parse error,
error, so will ssuuddoo and no one will be able to ssuuddoo again until the so will ssuuddoo and no one will be able to ssuuddoo again until the error is
error is fixed. If "e" is typed to edit the _s_u_d_o_e_r_s file after a fixed. If `e' is typed to edit the _s_u_d_o_e_r_s file after a parse error has
parse error has been detected, the cursor will be placed on the line been detected, the cursor will be placed on the line where the error
where the error occurred (if the editor supports this feature). occurred (if the editor supports this feature).
OOPPTTIIOONNSS OOPPTTIIOONNSS
vviissuuddoo accepts the following command line options: vviissuuddoo accepts the following command line options: accepts the following
command line options:
-c Enable cchheecckk--oonnllyy mode. The existing _s_u_d_o_e_r_s file will be --cc Enable _c_h_e_c_k_-_o_n_l_y mode. The existing _s_u_d_o_e_r_s file will be
checked for syntax errors, owner and mode. A message will checked for syntax errors, owner and mode. A message will be
be printed to the standard output describing the status of printed to the standard output describing the status of
_s_u_d_o_e_r_s unless the --qq option was specified. If the check _s_u_d_o_e_r_s unless the --qq option was specified. If the check
completes successfully, vviissuuddoo will exit with a value of 0. completes successfully, vviissuuddoo will exit with a value of 0.
If an error is encountered, vviissuuddoo will exit with a value If an error is encountered, vviissuuddoo will exit with a value of
of 1. 1.
-f _s_u_d_o_e_r_s Specify and alternate _s_u_d_o_e_r_s file location. With this --ff _s_u_d_o_e_r_s Specify and alternate _s_u_d_o_e_r_s file location. With this
option vviissuuddoo will edit (or check) the _s_u_d_o_e_r_s file of your option vviissuuddoo will edit (or check) the _s_u_d_o_e_r_s file of your
choice, instead of the default, _/_e_t_c_/_s_u_d_o_e_r_s. The lock choice, instead of the default, _/_e_t_c_/_s_u_d_o_e_r_s. The lock file
file used is the specified _s_u_d_o_e_r_s file with ".tmp" used is the specified _s_u_d_o_e_r_s file with ``.tmp'' appended to
appended to it. In cchheecckk--oonnllyy mode only, the argument to it. In _c_h_e_c_k_-_o_n_l_y mode only, the argument to --ff may be `-',
--ff may be "-", indicating that _s_u_d_o_e_r_s will be read from indicating that _s_u_d_o_e_r_s will be read from the standard input.
the standard input.
-h The --hh (_h_e_l_p) option causes vviissuuddoo to print a short help --hh The --hh (_h_e_l_p) option causes vviissuuddoo to print a short help
message to the standard output and exit. message to the standard output and exit.
-q Enable qquuiieett mode. In this mode details about syntax --qq Enable _q_u_i_e_t mode. In this mode details about syntax errors
errors are not printed. This option is only useful when are not printed. This option is only useful when combined
combined with the --cc option. with the --cc option.
-s Enable ssttrriicctt checking of the _s_u_d_o_e_r_s file. If an alias is --ss Enable _s_t_r_i_c_t checking of the _s_u_d_o_e_r_s file. If an alias is
used before it is defined, vviissuuddoo will consider this a used before it is defined, vviissuuddoo will consider this a parse
parse error. Note that it is not possible to differentiate error. Note that it is not possible to differentiate between
between an alias and a host name or user name that consists an alias and a host name or user name that consists solely of
solely of uppercase letters, digits, and the underscore uppercase letters, digits, and the underscore (`_')
('_') character. character.
-V The --VV (version) option causes vviissuuddoo to print its version --VV The --VV (_v_e_r_s_i_o_n) option causes vviissuuddoo to print its version
number and exit. number and exit.
EENNVVIIRROONNMMEENNTT EENNVVIIRROONNMMEENNTT
The following environment variables may be consulted depending on the The following environment variables may be consulted depending on the
value of the _e_d_i_t_o_r and _e_n_v___e_d_i_t_o_r _s_u_d_o_e_r_s variables: value of the _e_d_i_t_o_r and _e_n_v___e_d_i_t_o_r _s_u_d_o_e_r_s settings:
VISUAL Invoked by visudo as the editor to use VISUAL Invoked by vviissuuddoo as the editor to use
EDITOR Used by visudo if VISUAL is not set EDITOR Used by vviissuuddoo if VISUAL is not set
FFIILLEESS FFIILLEESS
_/_e_t_c_/_s_u_d_o_e_r_s List of who can run what _/_e_t_c_/_s_u_d_o_e_r_s List of who can run what
_/_e_t_c_/_s_u_d_o_e_r_s_._t_m_p Lock file for visudo _/_e_t_c_/_s_u_d_o_e_r_s_._t_m_p Lock file for visudo
DDIIAAGGNNOOSSTTIICCSS DDIIAAGGNNOOSSTTIICCSS
sudoers file busy, try again later. sudoers file busy, try again later.
Someone else is currently editing the _s_u_d_o_e_r_s file. Someone else is currently editing the _s_u_d_o_e_r_s file.
/etc/sudoers.tmp: Permission denied /etc/sudoers.tmp: Permission denied
You didn't run vviissuuddoo as root. You didn't run vviissuuddoo as root.
Can't find you in the passwd database Can't find you in the passwd database
Your user ID does not appear in the system passwd file. Your user ID does not appear in the system passwd file.
Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined
Either you are trying to use an undeclared Either you are trying to use an undeclared
{User,Runas,Host,Cmnd}_Alias or you have a user or host name listed {User,Runas,Host,Cmnd}_Alias or you have a user or host name listed
that consists solely of uppercase letters, digits, and the that consists solely of uppercase letters, digits, and the
underscore ('_') character. In the latter case, you can ignore the underscore (`_') character. In the latter case, you can ignore the
warnings (ssuuddoo will not complain). In --ss (strict) mode these are warnings (ssuuddoo will not complain). In --ss (strict) mode these are
errors, not warnings. errors, not warnings.
Warning: unused {User,Runas,Host,Cmnd}_Alias Warning: unused {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias was defined but never The specified {User,Runas,Host,Cmnd}_Alias was defined but never
used. You may wish to comment out or remove the unused alias. In used. You may wish to comment out or remove the unused alias. In
--ss (strict) mode this is an error, not a warning. --ss (strict) mode this is an error, not a warning.
Warning: cycle in {User,Runas,Host,Cmnd}_Alias Warning: cycle in {User,Runas,Host,Cmnd}_Alias
The specified {User,Runas,Host,Cmnd}_Alias includes a reference to The specified {User,Runas,Host,Cmnd}_Alias includes a reference to
itself, either directly or through an alias it includes. This is itself, either directly or through an alias it includes. This is
only a warning by default as ssuuddoo will ignore cycles when parsing only a warning by default as ssuuddoo will ignore cycles when parsing
the _s_u_d_o_e_r_s file. the _s_u_d_o_e_r_s file.
SSEEEE AALLSSOO SSEEEE AALLSSOO
_v_i(1), _s_u_d_o_e_r_s(4), _s_u_d_o(1m), _v_i_p_w(1m) vi(1), sudoers(4), sudo(1m), vipw(1m)
AAUUTTHHOORRSS AAUUTTHHOORRSS
Many people have worked on ssuuddoo over the years; this version of vviissuuddoo Many people have worked on ssuuddoo over the years; this version consists of
was written by: code written primarily by:
Todd C. Miller Todd C. Miller
See the CONTRIBUTORS file in the ssuuddoo distribution See the CONTRIBUTORS file in the ssuuddoo distribution
(http://www.sudo.ws/sudo/contributors.html) for an exhaustive list of (http://www.sudo.ws/sudo/contributors.html) for an exhaustive list of
people who have contributed to ssuuddoo. people who have contributed to ssuuddoo.
CCAAVVEEAATTSS CCAAVVEEAATTSS
There is no easy way to prevent a user from gaining a root shell if the There is no easy way to prevent a user from gaining a root shell if the
editor used by vviissuuddoo allows shell escapes. editor used by vviissuuddoo allows shell escapes.
BBUUGGSS BBUUGGSS
If you feel you have found a bug in vviissuuddoo, please submit a bug report If you feel you have found a bug in vviissuuddoo, please submit a bug report at
at http://www.sudo.ws/sudo/bugs/ http://www.sudo.ws/sudo/bugs/
SSUUPPPPOORRTT SSUUPPPPOORRTT
Limited free support is available via the sudo-users mailing list, see Limited free support is available via the sudo-users mailing list, see
http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search the
the archives. archives.
DDIISSCCLLAAIIMMEERR DDIISSCCLLAAIIMMEERR
vviissuuddoo is provided ``AS IS'' and any express or implied warranties, vviissuuddoo is provided ``AS IS'' and any express or implied warranties,
including, but not limited to, the implied warranties of including, but not limited to, the implied warranties of merchantability
merchantability and fitness for a particular purpose are disclaimed. and fitness for a particular purpose are disclaimed. See the LICENSE
See the LICENSE file distributed with ssuuddoo or file distributed with ssuuddoo or http://www.sudo.ws/sudo/license.html for
http://www.sudo.ws/sudo/license.html for complete details. complete details.
Sudo 1.8.6 July 12, 2012 Sudo 1.8.6
1.8.6 July 13, 2012 VISUDO(1m)

View File

@ -1,5 +1,8 @@
.\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!
.\" IT IS GENERATED AUTOMATICALLY FROM visudo.mdoc.in
.\"
.\" Copyright (c) 1996,1998-2005, 2007-2012 .\" Copyright (c) 1996,1998-2005, 2007-2012
.\" Todd C. Miller <Todd.Miller@courtesan.com> .\" Todd C. Miller <Todd.Miller@courtesan.com>
.\" .\"
.\" Permission to use, copy, modify, and distribute this software for any .\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above .\" purpose with or without fee is hereby granted, provided that the above
@ -18,297 +21,306 @@
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\" .\"
.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) .TH "VISUDO" "@mansectsu@" "July 12, 2012" "1.8.6" "System Manager's Manual"
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C`
. ds C'
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "VISUDO @mansectsu@"
.TH VISUDO @mansectsu@ "July 13, 2012" "1.8.6" "MAINTENANCE COMMANDS"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME" .SH "NAME"
visudo \- edit the sudoers file \fBvisudo\fR
\- edit the sudoers file
.SH "SYNOPSIS" .SH "SYNOPSIS"
.IX Header "SYNOPSIS" .HP 7n
\&\fBvisudo\fR [\fB\-chqsV\fR] [\fB\-f\fR \fIsudoers\fR] \fBvisudo\fR
[\fB-chqsV\fR]
[\fB-f\fR\~\fIsudoers\fR]
.SH "DESCRIPTION" .SH "DESCRIPTION"
.IX Header "DESCRIPTION" \fBvisudo\fR
\&\fBvisudo\fR edits the \fIsudoers\fR file in a safe fashion, analogous to edits the
\&\fIvipw\fR\|(@mansectsu@). \fBvisudo\fR locks the \fIsudoers\fR file against multiple \fIsudoers\fR
simultaneous edits, provides basic sanity checks, and checks file in a safe fashion, analogous to
for parse errors. If the \fIsudoers\fR file is currently being vipw(@mansectsu@).
edited you will receive a message to try again later. \fBvisudo\fR
locks the
\fIsudoers\fR
file against multiple simultaneous edits, provides basic sanity checks,
and checks for parse errors.
If the
\fIsudoers\fR
file is currently being edited you will receive a message to try again later.
.PP .PP
There is a hard-coded list of one or more editors that \fBvisudo\fR will There is a hard-coded list of one or more editors that
use set at compile-time that may be overridden via the \fIeditor\fR \fIsudoers\fR \fBvisudo\fR
\&\f(CW\*(C`Default\*(C'\fR variable. This list defaults to \f(CW"@editor@"\fR. Normally, will use set at compile-time that may be overridden via the
\&\fBvisudo\fR does not honor the \f(CW\*(C`VISUAL\*(C'\fR or \f(CW\*(C`EDITOR\*(C'\fR environment \fIeditor\fR
variables unless they contain an editor in the aforementioned editors \fIsudoers\fR
list. However, if \fBvisudo\fR is configured with the \fI\-\-with\-env\-editor\fR \fRDefault\fR
option or the \fIenv_editor\fR \f(CW\*(C`Default\*(C'\fR variable is set in \fIsudoers\fR, variable.
\&\fBvisudo\fR will use any the editor defines by \f(CW\*(C`VISUAL\*(C'\fR or \f(CW\*(C`EDITOR\*(C'\fR. This list defaults to
\fR@editor@\fR.
Normally,
\fBvisudo\fR
does not honor the
\fRVISUAL\fR
or
\fREDITOR\fR
environment variables unless they contain an editor in the aforementioned
editors list.
However, if
\fBvisudo\fR
is configured with the
\fR--with-env-editor\fR
option or the
\fIenv_editor\fR
\fRDefault\fR
variable is set in
\fIsudoers\fR,
\fBvisudo\fR
will use any the editor defines by
\fRVISUAL\fR
or
\fREDITOR\fR.
Note that this can be a security hole since it allows the user to Note that this can be a security hole since it allows the user to
execute any program they wish simply by setting \f(CW\*(C`VISUAL\*(C'\fR or \f(CW\*(C`EDITOR\*(C'\fR. execute any program they wish simply by setting
\fRVISUAL\fR
or
\fREDITOR\fR.
.PP .PP
\&\fBvisudo\fR parses the \fIsudoers\fR file after the edit and will \fBvisudo\fR
not save the changes if there is a syntax error. Upon finding parses the
an error, \fBvisudo\fR will print a message stating the line number(s) \fIsudoers\fR
file after the edit and will
not save the changes if there is a syntax error.
Upon finding an error,
\fBvisudo\fR
will print a message stating the line number(s)
where the error occurred and the user will receive the where the error occurred and the user will receive the
\&\*(L"What now?\*(R" prompt. At this point the user may enter \*(L"e\*(R" ``What now?''
to re-edit the \fIsudoers\fR file, \*(L"x\*(R" to exit without prompt.
saving the changes, or \*(L"Q\*(R" to quit and save changes. The At this point the user may enter
\&\*(L"Q\*(R" option should be used with extreme care because if \fBvisudo\fR `e'
believes there to be a parse error, so will \fBsudo\fR and no one to re-edit the
will be able to \fBsudo\fR again until the error is fixed. \fIsudoers\fR
If \*(L"e\*(R" is typed to edit the \fIsudoers\fR file after a parse error file,
has been detected, the cursor will be placed on the line where the `x'
error occurred (if the editor supports this feature). to exit without saving the changes, or
`Q'
to quit and save changes.
The
`Q'
option should be used with extreme care because if
\fBvisudo\fR
believes there to be a parse error, so will
\fBsudo\fR
and no one
will be able to
\fBsudo\fR
again until the error is fixed.
If
`e'
is typed to edit the
\fIsudoers\fR
file after a parse error has been detected, the cursor will be placed on
the line where the error occurred (if the editor supports this feature).
.SH "OPTIONS" .SH "OPTIONS"
.IX Header "OPTIONS" \fBvisudo\fR
\&\fBvisudo\fR accepts the following command line options: accepts the following command line options:
.IP "\-c" 12 accepts the following command line options:
.IX Item "-c" .TP 12n
Enable \fBcheck-only\fR mode. The existing \fIsudoers\fR file will be \fB-c\fR
checked for syntax errors, owner and mode. A message will be printed Enable
to the standard output describing the status of \fIsudoers\fR unless \fIcheck-only\fR
the \fB\-q\fR option was specified. If the check completes successfully, mode.
\&\fBvisudo\fR will exit with a value of 0. If an error is encountered, The existing
\&\fBvisudo\fR will exit with a value of 1. \fIsudoers\fR
.IP "\-f \fIsudoers\fR" 12 file will be
.IX Item "-f sudoers" checked for syntax errors, owner and mode.
Specify and alternate \fIsudoers\fR file location. With this option A message will be printed to the standard output describing the status of
\&\fBvisudo\fR will edit (or check) the \fIsudoers\fR file of your choice, \fIsudoers\fR
instead of the default, \fI@sysconfdir@/sudoers\fR. The lock file used unless the
is the specified \fIsudoers\fR file with \*(L".tmp\*(R" appended to it. \fB-q\fR
In \fBcheck-only\fR mode only, the argument to \fB\-f\fR may be \*(L"\-\*(R", option was specified.
indicating that \fIsudoers\fR will be read from the standard input. If the check completes successfully,
.IP "\-h" 12 \fBvisudo\fR
.IX Item "-h" will exit with a value of 0.
The \fB\-h\fR (\fIhelp\fR) option causes \fBvisudo\fR to print a short help message If an error is encountered,
\fBvisudo\fR
will exit with a value of 1.
.TP 12n
\fB-f\fR \fIsudoers\fR
Specify and alternate
\fIsudoers\fR
file location.
With this option
\fBvisudo\fR
will edit (or check) the
\fIsudoers\fR
file of your choice,
instead of the default,
\fI@sysconfdir@/sudoers\fR.
The lock file used is the specified
\fIsudoers\fR
file with
``\.tmp''
appended to it.
In
\fIcheck-only\fR
mode only, the argument to
\fB-f\fR
may be
`-',
indicating that
\fIsudoers\fR
will be read from the standard input.
.TP 12n
\fB-h\fR
The
\fB-h\fR (\fIhelp\fR)
option causes
\fBvisudo\fR
to print a short help message
to the standard output and exit. to the standard output and exit.
.IP "\-q" 12 .TP 12n
.IX Item "-q" \fB-q\fR
Enable \fBquiet\fR mode. In this mode details about syntax errors Enable
are not printed. This option is only useful when combined with \fIquiet\fR
the \fB\-c\fR option. mode.
.IP "\-s" 12 In this mode details about syntax errors are not printed.
.IX Item "-s" This option is only useful when combined with
Enable \fBstrict\fR checking of the \fIsudoers\fR file. If an alias is the
used before it is defined, \fBvisudo\fR will consider this a parse \fB-c\fR
error. Note that it is not possible to differentiate between an option.
.TP 12n
\fB-s\fR
Enable
\fIstrict\fR
checking of the
\fIsudoers\fR
file.
If an alias is used before it is defined,
\fBvisudo\fR
will consider this a parse error.
Note that it is not possible to differentiate between an
alias and a host name or user name that consists solely of uppercase alias and a host name or user name that consists solely of uppercase
letters, digits, and the underscore ('_') character. letters, digits, and the underscore
.IP "\-V" 12 (`_')
.IX Item "-V" character.
The \fB\-V\fR (version) option causes \fBvisudo\fR to print its version number .TP 12n
\fB-V\fR
The
\fB-V\fR (\fIversion\fR)
option causes
\fBvisudo\fR
to print its version number
and exit. and exit.
.SH "ENVIRONMENT" .SH "ENVIRONMENT"
.IX Header "ENVIRONMENT"
The following environment variables may be consulted depending on The following environment variables may be consulted depending on
the value of the \fIeditor\fR and \fIenv_editor\fR \fIsudoers\fR variables: the value of the
.ie n .IP "\*(C`VISUAL\*(C'" 16 \fIeditor\fR
.el .IP "\f(CW\*(C`VISUAL\*(C'\fR" 16 and
.IX Item "VISUAL" \fIenv_editor\fR
Invoked by visudo as the editor to use \fIsudoers\fR
.ie n .IP "\*(C`EDITOR\*(C'" 16 settings:
.el .IP "\f(CW\*(C`EDITOR\*(C'\fR" 16 .TP 17n
.IX Item "EDITOR" \fRVISUAL\fR
Used by visudo if \s-1VISUAL\s0 is not set Invoked by
\fBvisudo\fR
as the editor to use
.TP 17n
\fREDITOR\fR
Used by
\fBvisudo\fR
if
\fRVISUAL\fR
is not set
.SH "FILES" .SH "FILES"
.IX Header "FILES" .TP 26n
.ie n .IP "\fI@sysconfdir@/sudoers\fR" 24 \fI@sysconfdir@/sudoers\fR
.el .IP "\fI@sysconfdir@/sudoers\fR" 24
.IX Item "@sysconfdir@/sudoers"
List of who can run what List of who can run what
.ie n .IP "\fI@sysconfdir@/sudoers.tmp\fR" 24 .TP 26n
.el .IP "\fI@sysconfdir@/sudoers.tmp\fR" 24 \fI@sysconfdir@/sudoers.tmp\fR
.IX Item "@sysconfdir@/sudoers.tmp"
Lock file for visudo Lock file for visudo
.SH "DIAGNOSTICS" .SH "DIAGNOSTICS"
.IX Header "DIAGNOSTICS" .TP 6n
.IP "sudoers file busy, try again later." 4 \fRsudoers file busy, try again later.\fR
.IX Item "sudoers file busy, try again later." Someone else is currently editing the
Someone else is currently editing the \fIsudoers\fR file. \fIsudoers\fR
.ie n .IP "@sysconfdir@/sudoers.tmp: Permission denied" 4 file.
.el .IP "\f(CW@sysconfdir\fR@/sudoers.tmp: Permission denied" 4 .TP 6n
.IX Item "@sysconfdir@/sudoers.tmp: Permission denied" \fR@sysconfdir@/sudoers.tmp: Permission denied\fR
You didn't run \fBvisudo\fR as root. You didn't run
.IP "Can't find you in the passwd database" 4 \fBvisudo\fR
.IX Item "Can't find you in the passwd database" as root.
Your user \s-1ID\s0 does not appear in the system passwd file. .TP 6n
.IP "Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined" 4 \fRCan't find you in the passwd database\fR
.IX Item "Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined" Your user ID does not appear in the system passwd file.
.TP 6n
\fRWarning: {User,Runas,Host,Cmnd}_Alias referenced but not defined\fR
Either you are trying to use an undeclared {User,Runas,Host,Cmnd}_Alias Either you are trying to use an undeclared {User,Runas,Host,Cmnd}_Alias
or you have a user or host name listed that consists solely of or you have a user or host name listed that consists solely of
uppercase letters, digits, and the underscore ('_') character. In uppercase letters, digits, and the underscore
the latter case, you can ignore the warnings (\fBsudo\fR will not (`_')
complain). In \fB\-s\fR (strict) mode these are errors, not warnings. character.
.IP "Warning: unused {User,Runas,Host,Cmnd}_Alias" 4 In the latter case, you can ignore the warnings
.IX Item "Warning: unused {User,Runas,Host,Cmnd}_Alias" (\fBsudo\fR
will not complain)
\&.
In
\fB-s\fR
(strict) mode these are errors, not warnings.
.TP 6n
\fRWarning: unused {User,Runas,Host,Cmnd}_Alias\fR
The specified {User,Runas,Host,Cmnd}_Alias was defined but never The specified {User,Runas,Host,Cmnd}_Alias was defined but never
used. You may wish to comment out or remove the unused alias. In used.
\&\fB\-s\fR (strict) mode this is an error, not a warning. You may wish to comment out or remove the unused alias.
.IP "Warning: cycle in {User,Runas,Host,Cmnd}_Alias" 4 In
.IX Item "Warning: cycle in {User,Runas,Host,Cmnd}_Alias" \fB-s\fR
(strict) mode this is an error, not a warning.
.TP 6n
\fRWarning: cycle in {User,Runas,Host,Cmnd}_Alias\fR
The specified {User,Runas,Host,Cmnd}_Alias includes a reference to The specified {User,Runas,Host,Cmnd}_Alias includes a reference to
itself, either directly or through an alias it includes. This is itself, either directly or through an alias it includes.
only a warning by default as \fBsudo\fR will ignore cycles when parsing This is only a warning by default as
the \fIsudoers\fR file. \fBsudo\fR
will ignore cycles when parsing
the
\fIsudoers\fR
file.
.SH "SEE ALSO" .SH "SEE ALSO"
.IX Header "SEE ALSO" vi(1),
\&\fIvi\fR\|(1), \fIsudoers\fR\|(@mansectform@), \fIsudo\fR\|(@mansectsu@), \fIvipw\fR\|(@mansectsu@) sudoers(@mansectform@),
sudo(@mansectsu@),
vipw(@mansectsu@)
.SH "AUTHORS" .SH "AUTHORS"
.IX Header "AUTHORS" Many people have worked on
Many people have worked on \fBsudo\fR over the years; this version of \fBsudo\fR
\&\fBvisudo\fR was written by: over the years; this version consists of code written primarily by:
.sp
.RS 6n
Todd C. Miller
.RE
.PP .PP
.Vb 1 See the CONTRIBUTORS file in the
\& Todd C. Miller \fBsudo\fR
.Ve distribution (http://www.sudo.ws/sudo/contributors.html) for an
.PP exhaustive list of people who have contributed to
See the \s-1CONTRIBUTORS\s0 file in the \fBsudo\fR distribution \fBsudo\fR.
(http://www.sudo.ws/sudo/contributors.html) for an exhaustive list of people
who have contributed to \fBsudo\fR.
.SH "CAVEATS" .SH "CAVEATS"
.IX Header "CAVEATS"
There is no easy way to prevent a user from gaining a root shell if There is no easy way to prevent a user from gaining a root shell if
the editor used by \fBvisudo\fR allows shell escapes. the editor used by
\fBvisudo\fR
allows shell escapes.
.SH "BUGS" .SH "BUGS"
.IX Header "BUGS" If you feel you have found a bug in
If you feel you have found a bug in \fBvisudo\fR, please submit a bug report \fBvisudo\fR,
at http://www.sudo.ws/sudo/bugs/ please submit a bug report at http://www.sudo.ws/sudo/bugs/
.SH "SUPPORT" .SH "SUPPORT"
.IX Header "SUPPORT"
Limited free support is available via the sudo-users mailing list, Limited free support is available via the sudo-users mailing list,
see http://www.sudo.ws/mailman/listinfo/sudo\-users to subscribe or see http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or
search the archives. search the archives.
.SH "DISCLAIMER" .SH "DISCLAIMER"
.IX Header "DISCLAIMER" \fBvisudo\fR
\&\fBvisudo\fR is provided ``\s-1AS\s0 \s-1IS\s0'' and any express or implied warranties, is provided
including, but not limited to, the implied warranties of merchantability ``AS IS''
and fitness for a particular purpose are disclaimed. See the \s-1LICENSE\s0 and any express or implied warranties, including, but not limited
file distributed with \fBsudo\fR or http://www.sudo.ws/sudo/license.html to, the implied warranties of merchantability and fitness for a
for complete details. particular purpose are disclaimed.
See the LICENSE file distributed with
\fBsudo\fR
or http://www.sudo.ws/sudo/license.html for complete details.

View File

@ -20,8 +20,8 @@
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\" .\"
.Dd July 12, 2012 .Dd July 12, 2012
.Dt VISUDO 8 .Dt VISUDO @mansectsu@
.Os .Os Sudo @PACKAGE_VERSION@
.Sh NAME .Sh NAME
.Nm visudo .Nm visudo
.Nd edit the sudoers file .Nd edit the sudoers file
@ -36,7 +36,7 @@
edits the edits the
.Em sudoers .Em sudoers
file in a safe fashion, analogous to file in a safe fashion, analogous to
.Xr vipw 8 . .Xr vipw @mansectsu@ .
.Nm visudo .Nm visudo
locks the locks the
.Em sudoers .Em sudoers
@ -278,9 +278,9 @@ file.
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr vi 1 , .Xr vi 1 ,
.Xr sudoers 5 , .Xr sudoers @mansectform@ ,
.Xr sudo 8 , .Xr sudo @mansectsu@ ,
.Xr vipw 8 .Xr vipw @mansectsu@
.Sh AUTHORS .Sh AUTHORS
Many people have worked on Many people have worked on
.Nm sudo .Nm sudo