Skip to main content

Questions tagged [sudo]

sudo - Execute a command with superuser privileges.

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

Why does the following line break the terminal when executed in a non-interactive shell, but doesn't have the same effect when executed in an interactive shell? for i in {1..10}; do sudo -u testuser ...
Georgii's user avatar
8 votes
1 answer
461 views

On my Arch system, failed attempts to run sudo cause a line like this to be added to the logs (note the USER=root): Nov 20 14:59:31 oregano sudo[191472]: bob : user NOT in sudoers ; TTY=pts/26 ; ...
terdon's user avatar
  • 253k
1 vote
0 answers
64 views

Bash history works OK for except for sudo commands. Code from .bashrc follows. How can I modify the behaviour to include anything starting with sudo? NOTE. This behaviour is the same with a brand new ...
imazed's user avatar
  • 11
2 votes
1 answer
249 views

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
57 views

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
73 views

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
41 views

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

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
118 views

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
132 views

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
171 views

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
127 views

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

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
151 views

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

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,483
6 votes
1 answer
181 views

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
145 views

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

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 votes
2 answers
5k views

I inherited a Linux server; the previous administrator is no longer with our company. I can log in to the server via SSH with my company-wide Microsoft Directory administration user, and it works ...
Matthias Ronge's user avatar
0 votes
1 answer
573 views

I need to correct a script to mount a USB composition of µSD cards, all luks encrypted devices, with a common lvm on it and inside a fscrypted home backup partition. The idea is to look automatically (...
pedda's user avatar
  • 81
2 votes
1 answer
234 views

I am running Debian 12 and working on hardening my system. I'm looking at the sudo behavior at the moment. As expected, if I ssh into the system and run a sudo command, it prompts the first time, but ...
BobDoolittle's user avatar
  • 1,689
1 vote
3 answers
403 views

I recently hardened my RHEL system, and after that, sudo vi stopped working. When I try to run: sudo vi test.sh I get the following error: /bin/vi: line 23: /usr/libexec/vi: Permission denied /bin/vi: ...
RPE's user avatar
  • 11
-1 votes
1 answer
82 views

I want to do the following sudo commands at startup using .bashrc: apt update; apt upgrade; apt update (again); apt autoremove all of which require sudo. How can I do this at startup using bashrc? ...
valoren's user avatar
0 votes
0 answers
65 views

To reproduce this on a Debian device. Simply run the command sudo shutdown -h +5 after confirmation proceed with locking the device. In the login window you'll get the message: system is going down. ...
Sarkis's user avatar
  • 101
0 votes
1 answer
138 views

I was trying to use 'pam_usbin order to create a physical key for better security within my system. After installingpam_usb` AUR package, and performing the next code (according to the Archwiki docs):...
rustymanito's user avatar
0 votes
1 answer
150 views

So I was moving some files, I meant: mv ./* ~/something But I typed: mv /* something Now I can't boot up my computer and I couldn't because me: ls output: -bash: /bin/ls: No such file or directory ...
Nobody Nobody's user avatar
0 votes
1 answer
172 views

I am not having success using sudo visudo. I have read this article How to run a specific program as root without a password prompt? and this article sudo: password prompted even when NOPASSWD is set ...
AdvApp's user avatar
  • 153
2 votes
2 answers
369 views

sudo has the pleasant property of allowing one to cache credentials, i.e., if one is to execute multiple administrative commands in a row, there's less mistyping passwords. Can the same be achieved ...
Marcus Müller's user avatar
0 votes
1 answer
130 views

I have a bash script which logs into my bitwarden instance using the bw cli, in the following way: test.sh: #!/usr/bin/sh set -e -o pipefail bw logout --quiet || true BW_CLIENTID=$(cat ./credentials....
Christian Eriksson's user avatar
-5 votes
1 answer
92 views

I gives user king to be almost super user , and I set the following in /etc/sudoers king ALL=(ALL) NOPASSWD:ALL additionally we have other user that called – lincoin ( simple user ) now I ...
yael's user avatar
  • 14k
0 votes
1 answer
89 views

I have the following simple script that changed ownership on folders more hola_config.sh #!/bin/bash chown -R hola:pola /home/darna chmod -R 775 /home/darna in /etc/sudoers I added the following ( ...
yael's user avatar
  • 14k
1 vote
2 answers
146 views

Lets say I do some configuration in my $XDG_CONFIG_HOME (which is /home/user/.config). If I run micro text editor and it has custom keybindings and custom theme, doing sudo micro will load the default ...
George Răbuș's user avatar
0 votes
1 answer
50 views

As a root, have allowed user ubuntu to sudo sudo usermod -a -G sudo ubuntu but can't find any record in sudoers file about it - also /etc/sudoers.d/ is empty: Defaults env_reset Defaults ...
jurijus01's user avatar
0 votes
0 answers
225 views

I have a custom SSH server written in go that wraps commands called by the client in apparmor. One of the profiles confines sudo and what commands it can call. It started failing on a proxmox backup ...
bdrun33's user avatar
1 vote
1 answer
54 views

I want to configure passwordless sudoedit, to edit files under /etc with the exception of sudoers files themselves. I tried using the following /etc/sudoers.d/sudoedit: %sudo ALL=(root) NOPASSWD: ...
thiago's user avatar
  • 133
0 votes
1 answer
108 views

why is this happening? Expected output: # ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500...... Output that occurs: # ifconfig bash: ifconfig: command not found If sudo is ...
foxtrot22's user avatar
  • 101
0 votes
2 answers
111 views

There is a server to which I have access (login and password). Logging in as this user on this server it is found that my user is not logged into sudoers. No additional information is available, I ...
KukuruzoFirst's user avatar
0 votes
1 answer
246 views

To use a command with the "echo into a file" redirection operator >> through sudo... command, I have written that to redirect through standard input to the sudo process, executed as ...
Edward J's user avatar
0 votes
0 answers
40 views

i create file sh, i click file sh will start to executive. but Xterm not work to run plymouthd... instead kdesu is worked to run plymouthd..but i want to use xterm.. maybe i missing something ...
Manuel songokuh's user avatar
0 votes
1 answer
75 views

Problem Multiple engineers are using same machine with same loginuser and history gets loaded with others' people commands. Update: People login via private ssh keys (pub added/removed via trustedhosr)...
Vladimir Djuricic's user avatar
0 votes
1 answer
242 views

In a remote system to which I don't have console access, which I'm connecting through ssh, I broke the sudo installation and now I'm not able to use it at all, and I'm not able to restart as a root. ...
user236040's user avatar
3 votes
1 answer
483 views

On Linux Ubuntu when at terminal I run sudo su or sudo su - the system creates a new session with a new controlling pts, namely ubuntu@ubuntu:~$ lsb_release -a No LSB modules are available. ...
CarloC's user avatar
  • 385
2 votes
2 answers
12k views

I'm trying to install an app on SteamOS and it's through the Terminal. When I run the command, I need to enter my sudo password as can be seen below: The thing is, I’ve never set a sudo password as ...
Delphi Programming's user avatar
0 votes
3 answers
2k views

I need the GUI proxy manager Nekoray to always start in sudo mode, so that I don’t need to enter the sudo password multiple times when using the program. (I know this can be done in the terminal, but ...
Kolya's user avatar
  • 11
1 vote
4 answers
1k views

I log in wish SSH as one user "Ubuntu" on a server. I however want to manage run some systemd services as another user "ABC". If I try to sudo -u abc bash as user ABC then every ...
mousetail's user avatar
  • 113
-4 votes
1 answer
176 views

I just installed Manjaro, I have used other distros like Ubuntu and Mint before. After installing it I wanted to switch to root user, so I ran sudo su, went to give my password and it keeps saying it'...
user661973's user avatar
0 votes
1 answer
111 views

I recently installed silversearcher-ag with sudo and uninstalled it as it required sudo to run the command every single time. The command I used to install and uninstall this package respectively: # ...
stucash's user avatar
  • 111
0 votes
1 answer
254 views

I'm going to start weston in a user service. Starting weston in a super user service is no problem. But when I'm starting weston by the regular user, the weston won't start due to this file Could not ...
euraad's user avatar
  • 219
0 votes
0 answers
41 views

I entered command "sudo deluser myusername sudo", just out of curiosity. I was the only root user and this deleted myself from root user. Now I can't add back myself because I deleted my ...
uday badhani's user avatar
0 votes
1 answer
302 views

I have troubles with setting up a python script that should run as root, but without asking for password. It is not the first time that I do it, but this time it fails on Debian 12 What I have already ...
ivantad's user avatar

1
2 3 4 5
51