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).

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

executing pm2 from user gitlab-runner but running under root

I need to launch my pm2 application using gitlab-runner user. This user have sudo privileges. Need either to launch this pm2 process for root from user gitlab-runner. Or to make pm2 work properly ...
imf666's user avatar
  • 1
-1 votes
0 answers
21 views

Google authenticator MFA codes aren't working in Linux [migrated]

I want to enable MFA to use sudo commands on my laptop running Debian. I followed steps to enable this, and had the verification codes working for the desktop log in. But in terminal it keeps saying &...
gazm2k5's user avatar
  • 467
-1 votes
0 answers
53 views

Sudo-ed script seems to ignore sudo -u <user> line prefix

I have a script that needs to be executed as root (sudo), and I am attempting to insert a systemctl --user ... line in it. Unsurprisingly, this does not work ("Failed to connect to bus: No medium ...
Aqualung's user avatar
1 vote
2 answers
86 views

Azure pipeline . Install sudo in ubuntu 18.04 docker container failed - Permission Denied

I am trying to run CI/CD in Azure pipeline .Because my app need some dependencies that only work ubuntu 18.04 however that VmImage version deprecated in Azure hosted agent. That is why I run it on ...
J Nguyen's user avatar
  • 123
0 votes
0 answers
17 views

LaTeX issue on macOS: pdflatex and kpsewhich only work with sudo

Hello Stack Exchange community, I'm currently facing a perplexing issue with my LaTeX setup on macOS, and I'm seeking some guidance to understand and resolve the problem. Issue Description: When ...
T-Ray's user avatar
  • 227
0 votes
0 answers
28 views

How to do visudo edit in sudoers.d automatically in Python?

I have a complex django-application and want to add the option for the user to shutdown the server (a Raspberry Pi) from the django-webmenu. Because the django-process on the Raspi does not have sudo ...
LudgerH's user avatar
  • 31
0 votes
1 answer
30 views

transmission-daemon, download complete shell script - raspberry pi

permissions of the script is fine and the script runs fine however, if I run 'sudo' i get the following sudo: The "no new privileges" flag is set, which prevents sudo from running as root. ...
gyandoo's user avatar
0 votes
0 answers
18 views

VScode Task run while maintaining sudo

I would like to run a task that needs sudo and not need to authenticate each time. Rather I'd like to authenticate the first time and then again after it expires like I do in a terminal. It is similar ...
Hovestar's user avatar
  • 1,553
0 votes
0 answers
43 views

bash built-in command compgen is not found when executing a script as sudo [duplicate]

I have a set of tarballs in a directory. I want to select the "greatest" name of the tarballs (i.e. the first name when sorting in reverse order) and capture the name in a bash script ...
f1fan44's user avatar
  • 141
0 votes
0 answers
20 views

Run script using sudo with a get name inside returns root when using processes but doesnt for some other script that doesnt c#

So I have a script that is a master controller that has Environment.GetEnvironmentVariable("SUDO_USER") which returns the sudo users username which it should this script is ran using sudo ...
Adam Marshall's user avatar
0 votes
0 answers
54 views

Run command via python with sudo and capture stdout

I want to run a sudo command from within python, because my script does a lot of things, that should be handled without the right necessary for commands like apt install. Further for most of those ...
MaKaNu's user avatar
  • 770
0 votes
0 answers
23 views

Python Fabric Sudo Then Connect using Sudo Privilege

first time question here, apologies if I cannot format this properly. I am using Python 3.9.13 with Fabric 3.2.2 to do ssh to 3 ubuntu server (server1, server2 and server3) and do some commands as ...
edwin_pasaribu's user avatar
0 votes
1 answer
53 views

Cannot use docker without sudo privilege after following the official guide [duplicate]

I am trying to pull a Docker image by this command docker pull rabbitmq then I got this error Cannot connect to the Docker daemon at unix:///home/nickie/.docker/desktop/docker.sock. Is the docker ...
El Niño's user avatar
1 vote
1 answer
68 views

can I use hostname from ssh config in git clone?

Per git docs the following syntax is supported for git clone <directory> command: The following syntaxes may be used ssh://[user@]host.xz[:port]/path/to/repo.git/ An alternative scp-like syntax ...
Amine Tbaik's user avatar
0 votes
0 answers
15 views

Python.h: No such file or directory when installing a package

I installed various packages in my environment, however now I am trying to install qubovert package on an external cluster I have access to, but I am getting this error gcc -pthread -Wno-unused-result ...
Evan Camilleri's user avatar
0 votes
0 answers
29 views

Electron js: sudo access

I'm trying to create an electron app (for mac and windows) that copies some file to the root directory e.g /etc/. This requires sudo permissions from the user After doing some research I found https://...
Saim Ahmad's user avatar
0 votes
0 answers
27 views

I tried to install Apache2 on Raspberry Pi and I lost sudo privileges

Newbie to raspberry pi and linux here. I needed to install apache2 to my raspberry pi as a part of my homework and I lost privileges on sudo. I first ran sudo apt-get update sudo apt-get install ...
펠리반's user avatar
-2 votes
1 answer
33 views

How can I prevent django from claiming localhost port 80 via httpd after I've removed my project?

My problem is that my localhost port 80 is taken by an auto-reloading Django proc that I no longer need and I cannot kill the Django proc(s) because they auto-reload upon being killed. I did Django a ...
Ryan Atwood's user avatar
0 votes
0 answers
26 views

How to push to local git repo on seperate user without needing sudo

I've looked around and it seems I need to give my main user ownership of the files, but running chown on the files hasn't worked. chown -R user:user /home/git/repos/repo Here are the details for ...
Jake A's user avatar
  • 85
0 votes
1 answer
65 views

How to configure Fabric8 Maven Plugin to build with sudo

Problem I've been using the fabric8 maven plugin to build docker images. My user was part of the docker group and it all worked fine. I recently got a 'new more locked down' work computer and have ...
treekong's user avatar
  • 151
1 vote
1 answer
151 views

Ansible: How to run script that uses 'sudo' in places without 'become: true'?

I'm trying to run a shell script installer for a program via Ansible. The script makes some assumptions that is gets the login user for non-sudo commands and root user when needed via sudo. However, ...
idolize's user avatar
  • 6,485
-1 votes
1 answer
57 views

Why sudo cp doesn't work when I run in a custom Mac App but works when I run in the shell of Terminal?

In Terminal I move to Desktop and I create a folder App1.app with this commands (change <your_user> for your own Mac user): cd /Users/<your_user>/Desktop mkdir App1.app Then I move into ...
Asier Cayón Francisco's user avatar
0 votes
0 answers
32 views

Endless reboot cycle on Mac after using sudo shutdown

Without proper verification I used the code generated by ChatGPT, thinking that I would set up my Mac for automatic rebooting every hour. The commands here are quite simple, and someone knowledgeable ...
Like_north's user avatar
0 votes
0 answers
28 views

CMake, user running "sudo install", How do I now change the file owner to original user?

Wrote a CMakeList.txt file. At installation I am copying configuration files into users home directly .application hidden folder. install(FILES etc/config.tsv DESTINATION ${USER_HIDDEN_DIR} ...
CDR's user avatar
  • 8,238
0 votes
0 answers
35 views

how can I install jags on remote server?

I need to install jags so that I can use rjags (r package) for another r package, infercnv. I was able to do this on my own computer by downloading it through home-brew, but I am unable to do so on a ...
Warsame's user avatar
  • 69
0 votes
0 answers
22 views

how to stop and start service in linix with dart

from a DART I am trying to make commands on an ubuntu machine to activate and deactivate services with the sudo password but I receive an error.. this is my code down: the error : error stderr:[sudo] ...
techDesign's user avatar
1 vote
1 answer
66 views

sudo command no longer works in my applescript

2023 9/27 edit: if anyone knows how to configure Gordon Davisson's answer with Touch ID, that would fully resolve this post. 2023 9/9 original post: why might this not be working anymore? did ...
sockrabbtt's user avatar
0 votes
0 answers
20 views

How to restart service file without passowrd?

my service file is inside bin/systemd/system my_service.service, I want to restart it using (in c++). I am using ubuntu 20.04 system("sudo systemctl restart my_service.service"); but it's ...
Ankit Kumar's user avatar
1 vote
0 answers
128 views

How to run VSCode as root on WSL 2 without changing the default user?

I want to use VSCode with WSL extension (installed natively in Windows 10) as the editor for sudoedit and visudo commands of WSL 2 Debian 12 distro (which runs on the same phisical machine). To ...
Unideal's user avatar
  • 43
0 votes
0 answers
43 views

python / os.system : how to keep current environment variables of an executable

Sorry if I didn't find another post related to my issue. I have a binary "class" that I launch with current environment of my SHELL and the execution is fine : $ ./class params.ini But ...
guizmo133's user avatar
0 votes
1 answer
39 views

Not able to access docker command with non-sudo user?

Why I am getting this error when executing docker version with non-sudo user. I have installed docker using Script Output with non-sudo user docker version Client: Docker Engine - Community Version: ...
Waleed Akbar's user avatar
1 vote
0 answers
31 views

Issue with Wings and Panel Connection - Error while running `sudo wings --debug`

I'm facing a problem with the connection between Wings and Panel. When I try to execute the command sudo wings --debug, I'm encountering an error. I attempted to address this problem by using the ...
HamzaGSopp's user avatar
0 votes
0 answers
201 views

Deleting content of "/var/log/sudo-io"

I have a large amount of disk usage in the /var/log/sudo-io directory In the form om "AA, AB, AC..." directories Can I delete the complete content af this directory ?
Teddy_R's user avatar
  • 81
-1 votes
1 answer
130 views

"Command 'sudo' not found, did you mean" when trying to install mongodb on Ubuntu 22.04

I am trying to install mongodb on Ubuntu 22.04 per the official instructions for Ubuntu Linux at https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/#std-label-install-mdb-community-...
robert00's user avatar
0 votes
1 answer
24 views

ubuntu terminal - do not keep in memory sudo password once used it the first time

how can I disactivate to keep in memory the sudo passoword once I have use it in the terminal? For example, when I type "sudo apt update" it asks me the sudo password, but then, when I type &...
Emma Athan's user avatar
0 votes
1 answer
60 views

How can I use sudo su - in Rundeck?

I'm trying to run commands in RunDeck that require sudo su - without having to specify a username or password. I'm using OpenSSH as the Node executor. When running sudo su - through Rundeck, I am ...
Sloughi's user avatar
1 vote
0 answers
40 views

Running NodeJS script with privileged permissions - no console output

I'm using [email protected] and [email protected] and [email protected]. I have the following command I want to execute node ./test.cjs, but with privileged permissions. When I execute it without permissions, it ...
Tal Rofe's user avatar
  • 1,053
0 votes
0 answers
105 views

Ansible Timeout waiting for privilege escalation prompt when using ask-pass and ask-become-pass

We have a fairly restrictive procedure for creating new Centos 7 VMs on GCP. We create a VM from an image, then we log in with a so-called rescue user (let them be called xyzRescue) who has a very ...
Peter Evans's user avatar
0 votes
0 answers
44 views

Access Linux ethercat CoE interface as a normal (not sudo) user

I need to read/write the ethercat CoE interface as a normal (not sudo) user. Is there a command to do this at Linux? Or perhaps a systemd configuration that would work just like how udev rules work ...
Maj's user avatar
  • 41
0 votes
2 answers
52 views

Run sh file as root in python file

i´m trying to run an .sh file from my python skript to manually start a synch process with clone. is there an easy way? I tryed: os.system('sudo su') os.system('cd /home/pi/Desktop/webcam') os.system('...
zzzw3838's user avatar
-1 votes
1 answer
55 views

Is there a direct way to "send" a file from one user to another in Linux

To clarify for users who think this is a common question... I know how to use an intermediate directory with a common group to transfer a file between two users. In my situation that intermediate file ...
szofar's user avatar
  • 11
0 votes
1 answer
46 views

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) ...
Ashar's user avatar
  • 3,031
0 votes
0 answers
28 views

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 ...
st3b1t's user avatar
  • 3
0 votes
1 answer
78 views

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 ...
Sashank Bhagavatula's user avatar
0 votes
0 answers
77 views

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 ...
attdone's user avatar
0 votes
1 answer
2k views

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 ...
enstazao's user avatar
  • 121
0 votes
1 answer
65 views

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(...
Jose Piccioni's user avatar
1 vote
1 answer
78 views

How to open a new file to write in perl with sudo permission

I'm trying to open a new file and write something to it in a linux environment. In general the operating directory needs sudo privileges to create/write to a new file. In perl how can I ...
Biswajit Maharana's user avatar
0 votes
0 answers
186 views

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....
CatLover2291's user avatar
0 votes
0 answers
138 views

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 (...
Venden's user avatar
  • 1

1
2 3 4 5
57