2,848
questions
0
votes
0
answers
19
views
Permission error (EACCES) with npm after password change on macOS, unable to use sudo command
I recently changed the password for my admin account in Users & Groups on macOS and tried to install React, but I encountered the following error:
npm ERR! code EACCES
npm ERR! syscall open
npm ...
0
votes
0
answers
27
views
Adspower_Global won't run in Ubuntu 22.04 [closed]
I’ve installed AdsPower on Ubuntu 22.04. It installed successfully, but it won’t run. Upon checking with journalctl -xe in the terminal, this is what returns:
Aug 26 12:35:06 x280 systemd[1993]: ...
0
votes
1
answer
68
views
Ansible user privilege and application location
I am trying to deploy kubernetes using ansible playbooks. In this, I have quite a few doubts and problems. Can anyone please help me understand the following concepts or doubts?
When to use/not use ...
0
votes
2
answers
83
views
How to automatically add -E flag to sudo when starting Vim from Bash
I'm looking for a way to always start Vim as a sudo using -E "preserve environment" flag. Running sudo with this flag allows Vim to load .vimrc file and all themes/shortcuts.
I tried to ...
3
votes
3
answers
97
views
Using sudo, why are detached child process terminated when the parent dies?
I'm writing a program that requires admin privileges (an updater). At some point, we need to start another program and let the first one end. So the parent process makes a fork, detaches from its ...
-1
votes
0
answers
61
views
ModuleNotFoundError: No module named '_tkinter' on WSL 2 with ubuntu
I have been trying to install tkinter on WSL 2 but it wont work. I have upgrade WSL 1 to WSL 2 using the ubuntu linux but still i get the error ModuleNotFoundError: No module named '_tkinter'. Pls ...
0
votes
1
answer
44
views
How to sudo as jenkins user using password for privilege escalation
I want to run configuration playbooks as well as automatic patching using ansible and jenkins on linux servers. I need centralized environment for patching and node configuration, I opted for Jenkins ...
0
votes
0
answers
39
views
Is there a way of getting elevated access (sudo) on linux using microsoft azure/authenticator or something similar for 2FA?
We are looking for a way of replacing Yubikey KSM which has been EOL for a while. Does anyone know a way of maybe using Microsoft authenticator for getting elevated access for users or any other OTP?
...
0
votes
0
answers
25
views
Is it safe to delete csv files from /opt/lampp/var/mysql
I created these files by the into outfile “./file.csv” sql command, and when I delete them I get this error
Permission denied
I can only delete them using sudo
, but I am worried it will cause ...
-1
votes
1
answer
74
views
Flutter CLI, ran clean as root user, now I can't run it without sudo
Pretty much as described, I was making a script to automatically clean my build and fresh install my dependencies and accidentally ran flutter clean as root user. I didn't realize it would be an issue,...
0
votes
0
answers
40
views
Running sudo command in bash script [duplicate]
I have a db server where I am sshing into and I am running the command sudo -u oracle -H bash and I am able to validate that successfully by doing this manually but I am trying to do the same process ...
0
votes
1
answer
91
views
Unable to run 'sudo mvn' in WSL
When trying to run sudo with mvn e.g. 'sudo mvn spring-boot:run', in WSL (Ubuntu 24), I get the following error: 'sudo: mvn: command not found'.
Obviously, maven is installed and runs perfectly ...
-2
votes
1
answer
373
views
dpkg-checkbuilddeps: error: Unmet build dependencies
I'm building a Debian package using a Ubuntu container on azure pipeline.
Here is the yaml file:
trigger:
- master
pool: 'AWSLinux'
container:
image: ubuntu:20.04
options: "--name sample -...
1
vote
1
answer
97
views
Invoking script using launchd on MacOS is not working
Issue
I have a requirement to monitor a particular folder in Users/<user name>/Libraries/Developer/Xcode/DerivedData. I have written a script that should be run all the time in the background to ...
0
votes
1
answer
48
views
Install Sudo and apt-get in bluehost server [closed]
I have been trying to install sudo command and apt-get command in my Linux server by below command,
yum install sudo or apt-get install sudo
But I am getting below error,
-bash: apt: command not ...
0
votes
0
answers
71
views
SVN only works on sudo on Mac Sonoma
I have the brew subversion installed.
svn, version 1.14.3 (r1914484)
compiled Dec 9 2023, 13:27:10 on arm-apple-darwin23.5.0
Copyright (C) 2023 The Apache Software Foundation.
This software ...
0
votes
1
answer
177
views
Dotnet aspire - workload udpate requires elevated permissions - Sudo can't find command dotnet - M3 Pro MacOS Sonoma
I'm attempting to follow the getting started guide below for .net aspire with VSCode
https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=linux&pivots=vscode#install-net-...
0
votes
0
answers
21
views
What to do after installing npm packages globally with sudo?
I installed a npm package globally on my Mac. I used sudo for it since I had permission issue.
I know this is totally not the way to do it, but at this time I wasn't aware of it. I read a lot things ...
0
votes
0
answers
25
views
the process made twice, when i execute my program once
In Linux, I have just simple test code to testing process made
once or twice.
when I execute my program
program is just sleep 2seconds and print something inside for loop
sudo ./test &
the ...
1
vote
0
answers
63
views
Why does Pygame Mixer not work when using sudo?
I have a super simple python script:
import pygame
pygame.mixer.init()
When executing this on a RaspberryPi, it works like a charm:
python mytest.py -> OK
But when running as sudo, I get a weird ...
1
vote
0
answers
23
views
Run VSCode task as another user
I'm running a simple script in a VSCode task like this:
.vscode/say_hello.sh:
echo Hello World, this is $(whoami)!
.vscode/tasks.yaml:
{
"version": "2.0.0",
"tasks&...
0
votes
1
answer
1k
views
What is the password for jovyan user in jupyter lab docker container?
I have pulled the jupyter/datascience-notebook:latest image from docker hub and launched an instance container of it. I logged into the container through bash. Now i want to restart the server itself ...
2
votes
2
answers
734
views
Why can't I open a Mac file (operation not permitted) until AFTER one sudo command?
Here's a mystery. First, I can't open a specific file on my Mac, even though I have read permission:
$ cd Downloads
$ ls -l "WhatsApp Video 2024-05-02 at 15.06.16.mp4"
-rw-r--r--@ 1 smith ...
0
votes
1
answer
73
views
How to use -S option with sudo tee in bash script (use inline password with sudo tee)
I am trying to create a file using bash script. Here is the function that I am using.
function create_service_file() {
# create service file
echo "Creating service file /etc/systemd/...
0
votes
2
answers
160
views
Starting with the latest Debian 12 ami (ami-04d8e65bd49d048bd), sudo: unable to resolve host ip-x-x-x-x: Name or service not known
With
aws ssm get-parameters-by-path --path /aws/service/debian/release/bookworm/ --recursive
I was able to list all official Debian 12 AMIs and I am only interested in amd64 AMIs.
My VPC and subnet ...
0
votes
1
answer
48
views
Set program permissions at runtime
I am trying to use a linux kernel module to do some hardware control on my raspberry pi. It's fairly trivial user-level code, but implementing some of the functionality as a kernel module is a ...
0
votes
0
answers
95
views
How can i solve the PNPM permission error?
Whenever I try to use pnpm to run pnpm install or pnpm add, I always encounter this error, and I have to add the sudo command for install or add to execute properly. Where and how should I set ...
0
votes
0
answers
67
views
termios.TIOCSTI when sudo
I have a problem when I want to fake an input for the next bash prompt, the following code is running correctly :
import fcntl
import termios
with open("/dev/stdout", 'w') as fd:
for c ...
-1
votes
1
answer
126
views
I am getting the foillowing error with Ansible Playbook FAILED! => {"changed": false, "module_stderr": "sudo: a password is required\n",
- name: Basic Setup
hosts: all ## run on all hosts
gather_facts: false
become: true ## means become sudo or superuser
vars:
ansible_python_interpreter: /usr/bin/python3
tasks:
- ...
0
votes
1
answer
204
views
Set openvpn username and password via env-variable
I have a rather long password that I want to automate using a secret manager, I don't want to store it in plaintext.
Judging from this answer, I can achieve this using env-variables, which is great.
A ...
0
votes
0
answers
142
views
macOS - Most secure way of a GUI SUDO_ASKPASS
I'm developing a macOS desktop application that interfaces with Homebrew. It does this by calling actual shell commands. Sometimes brew needs the user's password to complete some tasks and I want to ...
0
votes
1
answer
26
views
How to fix npm errors without writing sudo in macOS?
I have to write sudo before running any npm command in my VS code terminal in MacBook Air (OS: macOS Sonoma 14.4).
Example: sudo npm install
sudo npc create-react-app my app
If I didn't "sudo&...
0
votes
1
answer
113
views
sudo command behaviour difference with the -i flag
I intend to write a shell wrapper for the sudo command together with the full login context of the root account. I encountered the issue that the dollar character disappeared or interpreted somewhere ...
0
votes
0
answers
92
views
PgAdmin Connection Error: "getaddrinfo ENOTFOUND postgresdb" (Docker Compose)
I'm trying to connect PgAdmin to a PostgreSQL container running with Docker Compose, but I'm encountering a connection error. My docker-compose file and env below
version: '3.9'
services:
app:
...
0
votes
0
answers
44
views
How to run sudo visudo in a Dockerfile?
I am creating a Dockerfile using the centos:7 base image.
I need to edit the file at etc/sudoers and append NOPASSWD privileges to it for a new consul user and some groups.
I have looked up in forums ...
-1
votes
2
answers
7k
views
ERROR: failed to solve: process "/bin/sh -c apt-get update" [closed]
I have the following Dockerfile where I want to build a Docker container from the image at https://hub.docker.com/r/julianassmann/opencv-cuda/:
FROM julianassmann/opencv-cuda
#image name with OpenCV ...
0
votes
0
answers
113
views
Facing an error while updating my Ubuntu. showing that I am missing a file
The error i am getting while updating my Ubuntu:
W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation ...
0
votes
1
answer
120
views
VSCode remote debug raspberry pi with pigpio needs sudo
I have VSCode running on win10 and I'm debugging on a headless raspberry pi in C++. The configuration works when I just use vanilla C++ stuff. But when I need to access the IO with pigpio it needs ...
0
votes
1
answer
174
views
How can I execute a sudo command in a macOS app and persist root user privileges?
I need to implement the following behavior in my app: When the app is run for the first time, prompt the user to authenticate by entering their administrative password. Upon successful authentication, ...
1
vote
0
answers
316
views
Ansible: Missing sudo password after setting nopasswd - Cache or something?
I have a problem with some of my playbooks. I have two playbooks that are running after another. The first one is setting some requirements, like installing python3 (with a raw command) and sudo. ...
-2
votes
1
answer
52
views
Apple Script to run an application as root (Part 2)
I am using the following Apple Script code to run an application:
do shell script "/Applications/MyApp.app/Contents/MacOS/myapp > /dev/null 2>&1 &" with administrator ...
2
votes
0
answers
138
views
Why doesn't this bash script print stdout on console when run as sudo?
Consider the following script:
#!/bin/bash
# Define a function to redirect both stdout and stderr
redirect_both_to() {
local log_file=logfile.log
exec > >(tee -a "$log_file") ...
0
votes
1
answer
274
views
Removed Sudo access from only user by changing UID and GUID [closed]
I mistakenly changed my UID and GUID of the active (and only) user on my raspberry pi server by changing the UID and GUID directly in the /etc/passwd file. I am connecting only with ssh as it is a ...
0
votes
0
answers
284
views
relocation R_X86_64_TPOFF32 against hidden symbol `pkgcontext' can not be used when making a shared object
I am getting this error when ever I try to use <colcon build>,
The error is as followss:
/usr/bin/ld: /usr/local/lib/libpython3.12.a(import.o): relocation R_X86_64_TPOFF32 against hidden symbol `...
0
votes
0
answers
96
views
PyWiFi AttributeError 'module' object has no attribute 'PyWiFi' when running with sudo on Linux
I am facing an issue with PyWiFi on Linux when running my Python script with sudo. The error message I encounter is "AttributeError: module 'pywifi' has no attribute 'PyWiFi'." However, when ...
0
votes
0
answers
194
views
Run pytests with sudo within VSCode
The project I'm working on is using a pytest test system which is fully integrated into the VSCode project. I had to add some tests which need to be executed as root because they use mininet to employ ...
0
votes
0
answers
59
views
sudo -u not preserving the scripts sourced in my shell
I have a bash script which add some functions to my shell. The script is as follows
#!/usr/bin/env bash
function invoke_echo() {
echo "test"
}
when I source this script to my shell and ...
3
votes
1
answer
435
views
File permission is 0666, but can not open even as root
I am experimenting with flock:
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include &...
0
votes
0
answers
65
views
Electron js, Sudo-prompt, on macos returns "command failed" for copy and mv
I need to allow my electron app to copy or move directories in system directories. I use sudo-prompt to elevate the right and run mv or cp -R command but the package returns Command failed error on ...
2
votes
2
answers
720
views
Apple Script to run an application as root
I am trying to use an Apple Script to run an application as root without asking for password all the time. I used this Apple Script code:
do shell script "/Applications/MyApp.app" user name &...