Skip to main content

Questions tagged [sudo]

sudo - Execute a command with superuser privileges.

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 ...
nightcrawler's user avatar
-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. ...
Alberto Pietrogrande's user avatar
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 ...
Just a learner's user avatar
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 ...
newunix's user avatar
  • 339
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 ...
胡钰承's user avatar
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 ...
WilliamH25's user avatar
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>...
Liric Ramer's user avatar
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....
user1532080's user avatar
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 ...
ARMs_for_the_poor's user avatar
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 ...
codeandfire's user avatar
-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....
mmmm's user avatar
  • 101
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/...
RonJohn's user avatar
  • 1,473
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 ...
Daryel Villavicencio's user avatar
-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 ...
Cristian Tatu's user avatar
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 ...
LuckyJollyMoments's user avatar

15 30 50 per page
1
2 3 4 5
169