sudoers

Jenkins sudo: no tty present and no askpass program specified with NOPASSWD

主宰稳场 提交于 2021-01-20 16:23:52
问题 I spend several days setting up the file /etc/sudoers to be able to give permissions to root to the user jenkins . I have Jenkins installed on my server because I host several projects with symfony, ionic, neo4j, etc... The problem is that I can not do build in the projects with ionic, I get this error: sudo: no tty present and no askpass program specified. This is the content of my /etc/sudoers file: # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding

Cannot create directory. Permission denied inside docker container

眉间皱痕 提交于 2020-04-07 15:06:14
问题 Can not create folder during image building with non root user added to sudoers group. Here is my Dockerfile: FROM ubuntu:16.04 RUN apt-get update && \ apt-get -y install sudo RUN adduser --disabled-password --gecos '' newuser \ && adduser newuser sudo \ && echo '%sudo ALL=(ALL:ALL) ALL' >> /etc/sudoers USER newuser RUN mkdir -p /newfolder WORKDIR /newfolder I get error: mkdir: cannot create directory '/newfolder': Permission denied 回答1: Filesystems inside a Docker container work just like

Cannot create directory. Permission denied inside docker container

孤人 提交于 2020-04-07 15:04:10
问题 Can not create folder during image building with non root user added to sudoers group. Here is my Dockerfile: FROM ubuntu:16.04 RUN apt-get update && \ apt-get -y install sudo RUN adduser --disabled-password --gecos '' newuser \ && adduser newuser sudo \ && echo '%sudo ALL=(ALL:ALL) ALL' >> /etc/sudoers USER newuser RUN mkdir -p /newfolder WORKDIR /newfolder I get error: mkdir: cannot create directory '/newfolder': Permission denied 回答1: Filesystems inside a Docker container work just like

Cannot create directory. Permission denied inside docker container

吃可爱长大的小学妹 提交于 2020-04-07 15:02:15
问题 Can not create folder during image building with non root user added to sudoers group. Here is my Dockerfile: FROM ubuntu:16.04 RUN apt-get update && \ apt-get -y install sudo RUN adduser --disabled-password --gecos '' newuser \ && adduser newuser sudo \ && echo '%sudo ALL=(ALL:ALL) ALL' >> /etc/sudoers USER newuser RUN mkdir -p /newfolder WORKDIR /newfolder I get error: mkdir: cannot create directory '/newfolder': Permission denied 回答1: Filesystems inside a Docker container work just like

How to update sudoers permission from AWS SSM [closed]

亡梦爱人 提交于 2020-03-28 06:40:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 days ago . Did anyone know how to update sudoers rights using AWS System Manager (SSM)? I want to grant my user rights equivalent to root , across ec2 instances. User is: "qaadmin" It should look like: qaadmin ALL=(root) NOPASSWD: ALL Any idea how to do it using SSM ? Thanks in advance. 来源: https://stackoverflow.com

visudo nopasswd not working

纵然是瞬间 提交于 2020-01-22 23:00:11
问题 I am trying to allow all users in the admin group to run a jar file as SUDO without a password, I have edited the sudoers file (using visudo) and tried a number of commands but it still prompts me for a password every time Contents of /etc/sudoers : # /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # See the man page for details on how to write a sudoers file. # Defaults env_reset # Host alias specification # User alias specification # Cmnd alias specification #

Editing the sudoers file on Mac or Linux when you have no permissions

我是研究僧i 提交于 2020-01-16 05:37:08
问题 I'm trying to install something on my MacOS (or Linux) system and I don't have permission because I'm not the admin. So I tried using sudo and it says that I'm not in /etc/sudoers file. I've tried editing the sudoers file but it won't let me, so I "googled" it. Everybody says to use visudo to edit the file. The problem is, it won't even let me use visudo ! When I type "visudo" it just says visudo: /etc/sudoers: Permission denied Would appreciate some help. Thanks in advance! EDIT: I tried

How to run script as another user without password?

柔情痞子 提交于 2019-12-27 10:30:02
问题 I have script.sh that must be run as user2. However, this script can only be run under user1 in my application. I would like the following command to run: su user2 -C script.sh but be able to run without password. I also want this to be very restrictive, as in user1 can only run script.sh under user2 and nothing else. I've tried doing this with sudoers file and just got endlessly confused after hours of trying. If somebody can provide an explicit example of how this can be accomplished

Adding a sudoers file in chef fails at verification

自闭症网瘾萝莉.ら 提交于 2019-12-24 18:58:11
问题 goal I'm trying to add/edit a sudoers file in Chef. After a lot of serach (and broken sudoers) I found this question and the answer seemed to be exactly what I am after. My cookbook So in my chef I added the following visudo cookbook: The recipe: ~/chef-repo/cookbook/visudo/recipes/allowUpgrade.rb template '/etc/sudoers.d/allowUpgrade' do cookbook 'visudo' source 'allowUpgrade.erb' owner'root' group 'root' mode '0440' verify "visudo -c -f %{path}" end My template: ~/chef-repo/cookbooks/visudo

Should we really use chef to manage the sudoers file?

◇◆丶佛笑我妖孽 提交于 2019-12-22 10:08:40
问题 This is my question. I am worried that if Chef breaks something in the sudoers file, probably by a Chef user using the cookbook incorrectly, then the server will be entirely inaccessible. I would hate for us to completely lose a production server for a customer because we messed up the sudoers file and can no longer ssh into the box. 回答1: Chef has a feature to help with this, verifiers. You can set up the verifies on your sudoer template like this: template '/etc/sudoers' do source 'whatever