Questions tagged [sudo]

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root). The name is an abbreviation for "substitute user do" (as in, do a command as if started by another user).

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root). The name is an abbreviation for "substitute user do" (as in, do a command as if started by another user).

Unlike the su command, users typically supply their own password to sudo rather than the root password. After authentication, and if the /etc/sudoers configuration file permits the user access, then the system will invoke the requested command.

2818 questions
0
votes
1 answer

Unable to get docker command run on remote host using ssh return same output as run manually

from user1@host1 I wish to execute a docker command on a remote host i.e root@host2 Thus, on remote host2 I made the below changes: sudo visudo user1 ALL=(ALL) NOPASSWD: /bin/docker dbuser ALL=(ALL) NOPASSWD: /bin/docker I login from host1 to host2…
Ashar
  • 2,942
  • 10
  • 58
  • 122
0
votes
0 answers

switching user sessions GPG signature not work

In the same terminal I need to switch user and be able to use gnugpg properly The next script (which could also be a bash alias) to switch the terminal shell to another user. I want running this script to ask me only the password for the sudo…
st3b1t
  • 1
0
votes
1 answer

Errno 13 whenever .py file is run with sudo on Linux

Whenever I run any .py script with sudo, even simple ones, I get the error "[Errno 13] Permission denied" on Linux. The reason I want to run a Python script with sudo in the first place is because the "keyboard" module in one of my files needs root…
0
votes
0 answers

sudo execution fails in do_pull_image() of .bb file

As I am using iMX series board, for that I am using Yocto 4.0 as source. I wanted to port container-image from https://github.com/savoirfairelinux/meta-embedded-containers to my build setup containing 4.0. While building bitbake…
Aysha
  • 1
  • 1
0
votes
1 answer

Could not connect to a docker provider. Please start or install a docker provider

I am installing Drupal on Linux(Ubuntu 20.04) using ddev. ddev requires docker installed and in Ubuntu, I can connect with docker using sudo. If I want to check for the running container I will use the command. sudo docker ps But when I run this…
enstazao
  • 121
  • 1
  • 8
0
votes
1 answer

how to execute a sudo command using vim function as a parameter (inside vim)

My path is something like /home/me/projects/project_name/the_part/i_wanna/keep.yestheextensiontoo I wrote this fuction: function! CurrentPath() let filepath = expand("%") let spl = split(filepath, '/') let short = spl[4:-1] let newpath =…
0
votes
0 answers

Error Sudo Docker Compose Yaml Error - Top-level object must be a mapping

I tried the command sudo docker compose run web django-admin startproject moneymattersweekly, and received the following: parsing /Users/eleahburman/Desktop/code/money-matters-weekly/docker-compose.yaml: Top-level object must be a mapping Here is my…
0
votes
0 answers

How to start yarn in sudo root?

I have a problem on my project, i need to be in super user for start my backend part of my project. Instead of use the command sudo npm start, my boss want me to use yarn but when I try sudo yarn dev (dev is a script that correspond to nest start…
Venden
  • 1
  • 5
0
votes
0 answers

how can I give create a user with sudo privilages while creating an image using oraclelinux:7-slim image

I want to create a user with sudo privilages using oracleLinux:7-slim.In the Dockerfile I am using the below code,when I am building an image using this Dockerfile it is failing while creating the user: FROM oraclelinux:7-slim RUN yum -y install…
ankit kansal
  • 227
  • 1
  • 3
  • 5
0
votes
1 answer

Is there a way to whitelist a set of normal commands and block usage of any commands outside of that?

Within this environment, a user named 'user' has the ability to use sudo, but because of how I have the networking and stuff behind the scenes set up, I don't want the user to be able to access tools like iptables, iproute2, net-tools, etc. There…
kubectl
  • 13
  • 3
0
votes
0 answers

How to fix npm throwing EACCES error without sudo?

I'm trying to update the npm version in my terminal, but it throws the following error. This seems like a permission issue, but I am already the admin (there's only 1 user account on my Mac). Based on ChatGPT, it could be due to me installing node…
0
votes
0 answers

Is it possible to make psutil.users() function without root privileges?

I am trying to run the below code as part of a larger Python project to display information on an OLED screen using a startup service on a Raspberry Pi Linux set-up. However, the username will not appear unless I run the script as sudo can you…
0
votes
2 answers

Add user in the docker to specific group, but not working

I create the user "ros" inside the docker and add it in group "sudo", as shown in the docker script below. FROM ubuntu:20.04 [...] RUN useradd --create-home --shell /bin/bash -G sudo ros [...] However, the group adding never success. I also tried…
Brad
  • 23
  • 4
0
votes
0 answers

Rootless docker with account in sudoers group and passwordless sudo

I want to use use docker in "rootless mode". As I understand it, if a container (or the daemon itself) is compromised, then the code that breaks out into the host can only do damage limited to the access rights of the user running the docker daemon…
lonix
  • 14,255
  • 23
  • 85
  • 176
0
votes
0 answers

Sudo access to a linux VM running in the Google Cloud

I am trying to create a directory in root in a VM that is running in the Google Cloud. This requires sudo access. I've tried multiple ways of doing so, but to no avail. The documentation on the Google website states that all I have to do is to grant…
user1553131
  • 83
  • 1
  • 1
  • 5
1 2 3
99
100