Questions tagged [sudo]
sudo - Execute a command with superuser privileges.
2,533 questions
2
votes
1
answer
229
views
x2 sudo commands cannot be executed in terminal
I am running a Ubuntu system on my Radxa Zero 3E (single board computer)
Using its GPIO I am driving a 5V LED via an NPN transisitor. Everything works.
For switching it on I use gpioset $(gpiofind ...
-5
votes
1
answer
52
views
Impossible delete install disk macOs.app [closed]
I'm trying to delete "Install macOS Mojave.app" from my Mac using the terminal command sudo rm -r or rm -rf, but it reports root error/illegal option/directory permission restricted, etc.
...
1
vote
2
answers
67
views
`sudo which` command not finding executable that exists in regular user PATH [duplicate]
I'm encountering a confusing behavior with sudo and the which command. An executable is found when running which as a regular user, but not when using sudo which, even though it's accessible when ...
0
votes
0
answers
31
views
Can the guix package manager safely be utilized without sudo?
I am confused about how to utilize Guix on my Debian machine.
Should I run sudo guix install <package> or simply guix install <package>? If the package is more of a system package (i.e. a ...
2
votes
0
answers
64
views
All users obtain root privileges after logging in and are unable to exit, even if they are just regular users [closed]
In the Ubuntu 24.04LTS release, all users (including those not in the sudoers group) who log in and use commands such as whoami, id - un, and view UID will be displayed as root users with root ...
1
vote
1
answer
86
views
Unable to resolve host error when using sudo in Debian WSL
I was trying to update my packages sudo apt update; sudo apt upgrade on a newly created WSL Debian instance but all of the requests to get new repositories failed with this error.
sudo: unable to ...
2
votes
2
answers
130
views
Sudo doesn't work in my C wrapper
I’m trying to write a C wrapper to run a bash process. The goal of this wrapper is to apply a seccomp policy to restrict certain syscalls.
Here is the code:
#define _GNU_SOURCE
#include <stdio.h>...
2
votes
2
answers
142
views
Run firefox as a different user in Kubuntu
I want to run Firefox as different users (Kubuntu 24.04). I've created extra users, then I do
$ xhost +SI:localuser:NEW_USER
$ sudo -u NEW_USER firefox
I get this error message:
/user.slice/user-1000....
2
votes
1
answer
110
views
Shell script run as root fails with "Permission denied" upon calling external programs
I am required to use a program in a git pre-receive hook, which program can only be run as root. The program is called with a variety of arguments determined during runtime (which cannot be ...
11
votes
1
answer
1k
views
Why doesn't visudo, like sudoedit, spawn a text editor as a regular user?
As far as I know, sudoedit gives a user permission to edit a file that is owned and writable by root.
It makes a copy of that file, the copy is owned by the user, and then it spawns a text editor with ...
-1
votes
1
answer
128
views
Make script with chattr -i executable without sudo
I am on Linux Mint 20 with Cinnamon 4.6.7. I would like a non admin user reg to be able to make /etc/resolv.conf mutable without using sudo. So I made this script at /home/reg/make-resolv-conf-mutable....
0
votes
0
answers
31
views
Wildcard not expanding. sudo to blame? [duplicate]
RHEL 8.
$ alias suip
alias suip='sudo -iu postgres'
If I specify the complete filename, the ls command works as expected:
suip ls ~postgres/logs/pgbackrest_2025-04-30_01:00:01_incr.log
/var/lib/...
6
votes
1
answer
156
views
Sudo regex 1.9.16p2 - not working
I installed sudo v1.9.16p2 on a RHEL 9.5 server which should support regex matching. As a test I created a test user (testuser) and created a (simple?) rule in /etc/sudoers for this test user that ...
-2
votes
1
answer
130
views
Password revealed in terminal after empty password attempt [closed]
In Ubuntu (maybe other distros too) terminals it appears that password echoing gets enabled between failed password prompts revealing whatever is being typed (the password most probable).
I ...
12
votes
1
answer
1k
views
Why doesn’t `sudo -E` preserve `PERL5LIB`?
I’m experiencing a strange behavior related to environment variable preservation with sudo on macOS(15.2): sudo -E doesn't preserve the environment variable PERL5LIB.
Reproduction Steps
Set an ...