每当我使用sudo命令时,我都会收到以下消息:
sudo: unable to stat /etc/sudoers.d/README: No such file or directory
我在使用chmod时遇到了这样的麻烦,我用chmod更改了/etc/sudoers、/etc/sudoers.d和/etc/sudoers.d/README的权限。
我用/etc/sudoers解决了此链接的问题。
现在,当我查看文件/etc/sudoers.d/README的权限时,它说‘无法确定自述文件的权限’
当我使用ls时会发生这种情况。
ls -l /etc/sudoers.d/
ls: canno
在终端会话中输入sudo,将得到以下响应:
>>> /etc/sudoers.d/sudoers: too many levels of includes near line 30 <<<
sudo: parse error in /etc/sudoers.d/sudoers near line 30
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
当我第一次安装Ubuntu20.04时,我还删除了在引导时输入密码的登录要求,因为我
我安装了apache2包,我从终端运行了这个命令行,它给我带来了这样的错误
user@user:~$ sudo /etc/init.d/apache2 restart
sudo: /etc/sudoers.d is world writable
/etc/init.d/apache2: 64: .: Can't open /etc/apache2/envvars
/etc/init.d/apache2: 76: .: Can't open /etc/apache2/envvars
ERROR: APACHE_PID_FILE needs to be defined in /e
我正在尝试在教程中设置一个ansible用户。他们为ansible用户将NOPASSWD设置为ALL,这允许他们在不涉及密码的情况下随时使用-become根。
我试着做同样的事情,但一直无法得到同样的结果。运行CentOS 8,从visudo文件中运行以下行:
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
ansible ALL=(ALL) NOPASSWD: ALL
cloud_user ALL=(ALL) NOPASSWD: AL
sudo: /etc/sudoers is mode 0777, should be 0440
sudo: no valid sudoers source found, quitting
sudo: unable to initialize policy plugin
我有UbuntuServer12.04.4LTS和这个sudo问题,我不能使用sudo命令,请帮助大家,如何解决这个sudo错误。
📷
请帮帮忙!
root@debian:/home/debian8# cat /etc/sudoers
#
# 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 e
按照维基的S建议,我安装了ubuntu。但是,一旦所有安装都正确,并且我尝试通过apt-get安装另一个应用程序,我的sudoers文件出现了一个奇怪的问题:
max@host:~$ sudo apt-get install deluge deluge-web
sudo: /etc/sudoers.d/zfs is mode 0644, should be 0440
>>> /etc/sudoers.d/README: /etc/sudoers.d/zfs near line 18 <<<
sudo: parse error in /etc/sudoers.
我的AWS EC2实例上的用户具有不受限制的sudo访问,并且没有密码提示。这是一个Ubuntu20.04.4LTS VM。
下面是这个问题的一个例子:
~$ whoami
ubuntu
~$ groups
ubuntu
~$ sudo deluser ubuntu sudo
/usr/sbin/deluser: The user `ubuntu' is not a member of group `sudo'.
~$ sudo whoami
root
正如您所看到的,我已经将这个用户从除他们自己的组(ubuntu)之外的所有组中删除。
这是我的/etc/sudoers文件:
我有一个python脚本,它将调用一个系统调用来休眠系统(Ubuntu-Server)。我试着
#!/usr/bin/env python
import os
os.system('pm-hibernate')
如果我在没有sudo权限的情况下运行此命令,则会得到正确的错误:
This utility may only be run by the root user.
但是,当使用sudo权限调用此脚本时,什么都不会发生。如何在python中调用hibernate命令?
嗨,我正在创建docker映像,我需要在浏览器中自动打开jenkins页面,因为我需要将我的主机系统的(Windows)~/..ssh/id_rsa.PUB放置到~/..ssh/authorized_key。经过多次网站引用后,我尝试了以下代码
ADD http://mirrors.jenkins.io/war-stable/2.107.1/jenkins.war /opt/jenkins.war
RUN chmod 644 /opt/jenkins.war
ENV JENKINS_HOME /jenkins
# configure the container to run jenkins,
我的任务在UbuntuServer18.04中不起作用。有人能帮我吗?这是我的cron代码:
#This code doesn't run
* * * * * root sh /home/jaka/scripts/serviceChecker.sh
#I have try this below but doesn't work too
* * * * * /home/jaka/sripts/serviceChecker.sh
#I have try the code below but also doesn't work
* * * * * sh /home/jaka/
我也有类似的问题。我需要将/etc/sudoers中的一行移到文件的末尾。
我想移动的那条线:
#includedir /etc/sudoers.d
我试过用变量
#creates variable value
templine=$(cat /etc/sudoers | grep "#includedir /etc/sudoers.d")
#delete value
sed '/"${templine}"/d' /etc/sudoers
#write value to the bottom of the file
cat ${templine
我必须运行ftpserver与node.js和电子,使用简单的-ftpd在macOs上。它必须在端口21上运行,因为i不能更新设备的硬件参数。顺便说一下,所有< 1024端口都被锁定了。
我尝试使用pfctl转发21 -> 1337,我的设备可以找到ftpserver,但不能登录或写入。
echo “rdr pass on en0 inet proto tcp from any to any port 21 -> 127.0.0.1 port 1337” | sudo pfctl -ef -
我不想要求根密码后,每次启动。
我使用节点8,电子,简单-ftdp
伙计们,你们有什
我正在测试在运行manjaro的虚拟机中安装和编译一组软件。当sudo需要密码时,在其他机器上编译失败。我无法在虚拟机上重新创建这个问题,因为出于某种原因,vm从来不需要带有sudo的密码。
我尝试过从sudo配置文件中删除NOPASSWD行,但这没有起作用。
我也尝试过更改我的密码,但它仍然没有要求它。
sudo visudo的输出:
### sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may
这是一个12.04 ec2实例。
在手册页中,它说默认情况应该是在使用sudo时需要密码。我认为,通过设置ubuntu的帐户密码(如果没有设置),在使用sudo时可能会提示我输入密码,但当我使用passwd命令时,它要求我在允许更改密码之前输入原始密码。所以,尽管它看起来已经设置好了,但它并没有提示我使用sudo密码,而且在我使用sudo重写和更改ubuntu帐户密码之后,它仍然没有要求sudo密码。
不管怎样,我不知道这些细节到底有多重要。这是我的sudoers文件:
#
# This file MUST be edited with the 'visudo' command