Error: sudo: sorry, you must have a tty to run sudo
The reason for this is an update along the way with sudo locked it down further by adding the below line to /etc/sudoers configuration file.
-
Defaults requiretty
Defaults requiretty
To allow a remote script to login and run a command via sudo simply comment out that line as shown below.
-
# Commented out so remote script can login and run a command without a tty
-
# Defaults requiretty
# Commented out so remote script can login and run a command without a tty # Defaults requiretty
I would suggest making a comment in the sudoers file along with the actual script that is running just in case there is another systems administrator that is tasked with working on this server at a later date. Now when your script runs it will not throw that error and should be able to run the remote command that was initially required.
Instead of commenting it out for everybody, you can just turn it off for certain users (or user groups)
Defaults:alex !requiretty
相关推荐
1. 通过终端安装程序sudo apt-get install ***时出错: 2. 安装Gnome3, 3. Ubuntu11.04和11.10 在安装VMWare Tools遇到的问题
struts2标签,史上最详细的struts2标签介绍
sudo: unable to load /usr/libexec/sudo/sudoers.so: libz.so.1: cannot open shared object file: No such file or directory sudo: fatal error, unable to load plugins 等解决方法具体查看...
ubuntu 下vim配置,包括语法高亮,backspace。
在Linux系统上配置sudo的Ansible角色。 要求 去做。 角色变量 sudo_package :sudo包,按名称。使用sudo=ver固定到版本。默认为sudo 。 sudo_package_state :sudo软件包的安装状态。默认present 。 剧本范例 默认...
gsudo-Windows的sudo gsudo是Windows的sudo等效项,具有与原始* nix sudo相似的用户体验。 它允许在当前控制台窗口或新控制台窗口中以提升的权限运行命令,或提升当前外壳程序。 只需在sudo前添加gsudo (或sudo...
gsudo:一个简单的脚本,具有root用户访问权限来运行GUI应用程序
Ansible weareinteractive.sudo角色 weareinteractive.sudo是角色,它: 安装sudo 配置sudo 笔记: 由于Ansible Galaxy现在支持,因此该角色已从franklinkim.sudo更改为weareinteractive.sudo !安装使用ansible-...
sudo:以其他用户身份执行命令的实用程序
lxqt-sudo概述lxqt-sudo分别是命令sudo和su的图形前端。 这样,它使普通用户可以使用其他用户(包括root)的权限启动应用程序。安装编译源代码运行时依赖项是qtbase,sudo(应在所有* ix操作系统上默认安装su)和 。...
登录虚拟机,选择一个临时文件夹(例如~/build ),然后执行: git clone https://github.com/droboports/sudo.gitcd sudo./build.sh每次调用都会创建一个包含所有生成输出的日志文件。 ./build.sh distclean删除...
本文档介绍了dpkg命令的参数和使用方法
Termux-Sudo Sudo的懒惰怪胎脚本 #安装.. apt安装git git clone 光盘Termux-Sudo chmod + x sudo.sh bash sudo.sh
对于运行需要sudo的本机Electron应用程序的后台子进程很有用。 Windows ,将与本机User Account Control (UAC)提示符一起使用(无需PowerShell ) OS X使用捆绑的 (由启发) Linux ,使用系统pkexec或 (系统或...
NSudo 提供了一系列系统管理工具,并基于 SuperCMD,这是一款允许您使用 TrustedInstaller 令牌以 SYSTEM 身份运行程序的软件。 NSudo 是 SuperCMD 的升级版,因为它提供了许多其他功能。 与 SuperCMD 一样,它还...
此为centos6版的最新sudo-1.9.9.rpm包,修复修复CVE-2021-3156漏洞。 升级步骤: 1、将RPM包上传到服务器上, 2、执行升级命令: # rpm -Uvh sudo-1.9.9-1.el6.x86_64.rpm 3、执行完毕后,查询sudo版本: # sudo -V
此为centos7版的最新sudo-1.9.9.rpm包,修复修复CVE-2021-3156漏洞。 升级步骤: 1、将RPM包上传到服务器上, 2、执行升级命令: # rpm -Uvh sudo-1.9.9-1.el7.x86_64.rpm 3、执行完毕后,查询sudo版本: # sudo -V
django-sudo 对于您最敏感的页面,Sudo模式是额外的一层安全保护。 这是GitHub的 实现。这个是来做什么的? django-sudo为用户已经登录后提供了额外的安全保护。可以使用@sudo_required装饰@sudo_required ,然后...
Firstly, you must have a server which has installed Docker. Secondly, you should modify /etc/default/docker file, and add TCP connection mode to DOCKER_OPTS. The file maybe empty, so you also need ...