Command is not found in sudo

I've been building a server for the first time in a while, and it's easy to forget, so make a note. Make the superuser's PATH available for sudo.

$sudo visudo
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
#Defaults       secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Defaults        env_keep +="PATH"

Recommended Posts

Command is not found in sudo
Command not found with sudo rosdep init in ROS setup
command not found: django-admin
Exception: Jupyter command `jupyter-lab` not found.
[Super Beginner] [Tired Intermediate] When "command not found" or "command not found" is displayed
Verbose is not turned off in LightGBM
Bug that says'val_loss' is not found when using Early Stopping in pytorch-lightning (0.5.3.2)
Pipfile is not created in the current directory
When searching is not working in GAE's Datastore
When the selected object in bpy.context.selected_objects is not returned
I get a "bash: sudo: command not found" error on LINUX (Debian) built on Docker
Command when ACPI shutdown does not work in VirtualBox
When "ERROR: HTTP is not supported." Is displayed in mpsyt
Explanation for those who are having trouble with "command not found" in rbenv or pyenv
Test.py is not reflected on the web server in Python3.
Linux: How to recover if'grub_file_filters' not found in grub rescue
Python round is not strictly round
Is time.time () not very accurate?
Error: pg_config executable not found
When I start service with systemd, I get command not found even though the path is passing
TypeError:'int' object is not subscriptable
What is Linux? [Command list]
filter rollbar python 404 not found
Execute external command in python
Python list is not a list
Participate in nl command development
[Error] Symbol not found: _PyUnicodeUCS2_Compare
Mathematical functions found in Scipy
External command execution in Python
NameError: name'__file__' is not defined
Sequential processing method when there is not enough memory in Keras
[Golang] "package exec is not in GOROOT" when executing the test