Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on sudo.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/sudo.e>
#           or at <http://angg.twu.net/e/sudo.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######





# «.sudo»	(to "sudo")
# «.sudoers.d»	(to "sudoers.d")
# «.SUDO_USER»	(to "SUDO_USER")
# «.sudo.ws»	(to "sudo.ws")





#####
#
# sudo
# 2004aug17
#
#####

# «sudo»  (to ".sudo")
# (find-es "debian" "sudo")
# (find-status   "sudo")
# (find-vldifile "sudo.list")
# (find-udfile   "sudo/")
# (find-man "8 sudo")
# (find-man "5 sudoers")
# (find-man "5 sudoers" "NOPASSWD:")
# (find-man "5 sudoers" "PASSWD and NOPASSWD")
# (find-man "5 sudoers" "\nEXAMPLES")
# (find-man "5 sudoers" "FULLTIMERS      ALL = NOPASSWD: ALL")
# (find-man "8 visudo")
# (find-sh  "sudo cat /etc/sudoers")
# (find-fline "$ASROOT/etc/sudoers")
# (find-fline "$ASROOT/etc/sudoers.d/")
#*
UserEDITOR=nano visudo

#*
# Edrx:
# (find-es "sudo")
User_Alias FULLTIMERS = edrx, aleph, beth
FULLTIMERS ALL = NOPASSWD: ALL

#*
# (find-sh "sudo cat /etc/sudoers")
# (find-man "5 sudoers")
# (find-man "5 sudoers" "ALL = (ALL) ALL")
# (find-man "5 sudoers" "\n       User Specification")
#
# User_Alias FULLTIMERS = edrx, aleph, beth
#            NAME       = User, User,  User
#                         \---------------/
#                            User_list
#            \----------------------------/
#                  User_alias
# \---------------------------------------/
#                Alias
#
# FULLTIMERS    ALL    = (   ALL    ) NOPASSWD: ALL
# User_list  Host_list    Runas_List            Cmnd
#                        \----------/
#                         Runas_Spec
#                        \-------------------------/
#                                Cmnd_Spec
#                        \-------------------------/
#                             Cmnd_Spec_List
# \------------------------------------------------/
#             User_Spec
#*




#####
#
# sudoers.d
# 2023jan20
#
#####

# «sudoers.d»  (to ".sudoers.d")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cat /etc/sudoers.d/fulltimers
cd  /etc/sudoers.d/
cat > fulltimers <<'%%%'
# Edrx:
# (find-es "sudo")
User_Alias FULLTIMERS = edrx
FULLTIMERS ALL = NOPASSWD: ALL
%%%




#####
#
# SUDO_USER
# 2019jul01
#
#####

# «SUDO_USER» (to ".SUDO_USER")

Hi Everyone,

I think this is unexpected behavior:

    $ sudo apt-get install emacs-nox
    $ sudo emacs /etc/default/motd-news
    $ ls -Al ~ | grep emacs
    $ drwx------  2 root    root     4096 Jul  1 13:56 .emacs.d

Then, when I use emacs as non-sudo, I am nagged with:

    Warning (initialization): Unable to access `user-emacs-directory'
(~/.emacs.d/)

I think emacs should be creating files in user's $HOME as $SUDO_USER,
not root. Or, emacs should be creating .emacs.d/ in /root, not user's
$HOME.

Jeff




#####
#
# The sudo homepage at sudo.ws
# 2019dec16
#
#####

# «sudo.ws» (to ".sudo.ws")
# https://www.sudo.ws/
# https://www.sudo.ws/troubleshooting.html
# https://www.sudo.ws/devel.html
# https://www.sudo.ws/dist/sudo-1.8.29.tar.gz

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/sudo-1.8.29/
tar -C ~/usrc/ -xvzf $S/https/www.sudo.ws/dist/sudo-1.8.29.tar.gz
cd     ~/usrc/sudo-1.8.29/

# (code-c-d "sudosrc" "~/usrc/sudo-1.8.29/")
# (find-sudosrcfile "")
# (find-sudosrcfile "examples/sudoers")









#  Local Variables:
#  coding:               utf-8-unix
#  End: