SUDO_EDITOR
SUDO_EDITOR
Written by Zak Zhu
参考
- LinuxPanda/sudo的使用和配置(https://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_linux_009.html)
SUDO_EDITOR
man visudo
...
There are two sudoers settings that determine which editor visudo will run.
editor
A colon (‘:’) separated list of editors allowed to be used with visudo. visudo will choose the editor that matches the user's SUDO_EDITOR, VISUAL or EDITOR environment variable if possible, or the first editor in the list that exists and is executable. Note that the SUDO_EDITOR, VISUAL and EDITOR environment variables are not preserved by default when the env_reset sudoers option is enabled. The default editor path is /bin/vi which can be set at compile time via the --with-editor configure option.
env_editor
If set, visudo will use the value of the SUDO_EDITOR, VISUAL or EDITOR environment variables before falling back on the default editor list. Note that this may create a security hole as it allows the user to run any arbitrary command as root without logging. A safer alternative is to place a colon-separated list of editors in the editor variable. visudo will then only use SUDO_EDITOR, VISUAL or EDITOR if they match a value specified in editor. If the env_reset flag is enabled, the SUDO_EDITOR, VISUAL and/or EDITOR environment variables must be present in the env_keep list for the env_editor flag to function when visudo is invoked via sudo. The default value is on, which can be set at compile time via the --with-env-editor configure option.
...
visudo的默认editor是vi, 下面把editor修改为vim, 这样visudo就支持字体彩色显示
vim /etc/profile.d/SUDO_EDITOR.sh
SUDO_EDITOR="vim"
export SUDO_EDITOR
SUDO_EDITOR的更多相关文章
- Linux基础命令---sudo
sudo sudo允许用户以超级用户或安全策略指定的另一个用户的身份执行命令.Sudo支持安全策略插件和输入/输出日志的插件.第三方可以开发和分发自己的策略和I/O日志插件,以便与sudo前端无缝地工 ...
- Linux Hardening Guide
文章转载自:https://madaidans-insecurities.github.io/guides/linux-hardening.html 1. Choosing the right Lin ...
随机推荐
- 题解【CJOJ1070/UVA】嵌套矩形
P1070 - [Uva]嵌套矩形 Description 有 n 个矩形,每个矩形可以用两个整数 a, b 描述,表示它的长和宽.矩形 X(a, b) 可以嵌套在矩形 Y(c, d) 中当且仅当 a ...
- 为什么hadoop中用到的序列化不是java的serilaziable接口去序列化而是使用Writable序列化框架
继上一个模块之后,此次分析的内容是来到了Hadoop IO相关的模块了,IO系统的模块可谓是一个比较大的模块,在Hadoop Common中的io,主要包括2个大的子模块构成,1个是以Writable ...
- springboot引入Oracle依赖
最近学习spring boot,在网上找一些项目学习,有的项目引入了oracle驱动包,自己搭建一直不成功,百度发现说是权限问题无法下载. 然后参考下面博客终于解决:springboot引入Oracl ...
- hdu 1532 Drainage Ditches(网络流)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1532 题目大意是:农夫约翰要把多个小池塘的水通过池塘间连接的水渠排出去,从池塘1到池塘M最多可以排多少 ...
- 任务队列方案详解(一)JVM线程池
前言 我们都知道 web 服务的工作大多是接受 http 请求,并返回处理后的结果.服务器接受的每一个请求又可以看是一个任务.一般而言这些请求任务会根据请求的先后有序处理,如果请求任务的处理比较耗时, ...
- hive导出数据到本地文件报错解决方法
报错信息: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to move so ...
- php对字符串的操作3之 字符类型转换详解
所有的数据输出到屏幕上,实际上被隐式的转换成了字符型,首先了解下各种数据类型的字符串表示 <?php echo 300,'<hr>'; echo true,'<hr>'; ...
- 前台后台$.psot交互
前台 {include file='public/header' /} <body class="login-bg"> <div class="logi ...
- Tomcat目录说明
apache-tomcat-x.x.xx bin:保存启动与监控Tomcat的命令文件的文件夹 conf:保存Tomcat配置文件的文件夹,如servlet.xml为服务器的主配置文件,web.xml ...
- PyCharm中的django项目的引入
1.从github或者从本地的文件打开项目 2.项目引入后,python manage.py runserver 8080启动 1.启动的时候有错误,看看要引入的模块错误,然后把模块引入 D:\.St ...