Questions tagged [sudo]

The sudo command is a program for some Unix and Unix-Like operating systems, that allows a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user.

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

How do I enable ROOT Access on my J3 Orbit? [migrated]

My mobile is a Samsumg Galaxy J3 Orbit/ J3TOP. I've been trying to gain root access to enable superuser on it, but it doesn't work. It doesn't even say that I'm a user or device owner, how do I solve ...
0
votes
1answer
21 views

running sudo with PHP

Yes, there are many answers to a similar question, but mine is a bit more specific. I want to add the user running apache, www-data to sudoers, but everywhere I've read, they have added specific files ...
0
votes
1answer
18 views

Is it possible to modify the '/bin/su' command so that it will allow root access without password and without checking command ownership?

I don't know well how the su command works. I know that sudo command must be owned by root for it to work. Is it possible to modify the su command so that it runs the root shell without asking for the ...
0
votes
1answer
43 views

Why giving an environment variable to sudo su fails?

Putting PATH variable into sudo su - USER occurs an error: USER1@SERVER:~:$ sudo PATH=$PATH su - USER2 sudo: sorry, you are not allowed to set the following environment variables: PATH Following the ...
0
votes
0answers
29 views

Unable To Run Sudo On Terminal (Suspect Malware)

When I Run Any Sudo Commands I get: sudo: /etc/sudoers is owned by uid 501, should be 0 sudo: no valid sudoers sources found, quitting sudo: error initializing audit plugin sudoers_audit This behavior ...
0
votes
0answers
12 views

zsh (Default PATH?) messed up with mongodb installation

seems to be imposible after hours and hours trying to solve this problem. All my sudo terminal commands are corrupted due to a several path changes, so i ask for help to set the correct environment ...
0
votes
1answer
58 views

sudo: sorry, you are not allowed to set the following environment variables

I set an alias for sudo as: alias sudo='sudo PATH=$MY_PATH' I checked that this works well by running sudo printenv PATH. However, I encounter an error when running sudo su - USER2. sudo: sorry, you ...
0
votes
0answers
14 views

Installing and configuring software in Linux from a web server

I have an idea that came to me recently, and I would appreciate some guiding about the validity of the concept. Is it possible to control a linux distro (Ubuntu for instance) with sudo privilege from ...
0
votes
1answer
31 views

sudo vim can't write file

spotify.desktop can be written by root owner, so, I use $ sudo vim spotify.desktop to edit it, but, find that I can't save the modifications. The error is "only readable". Does anybody know ...
0
votes
0answers
21 views

Sudo PM2 command not found but works without [duplicate]

I have a PM2 process for my NodeJS server and it crash after few minutes. I read somewhere I need to run PM2 as root to not crash. So I do : debian@vps:~$ pm2 start server [PM2] Applying action ...
0
votes
0answers
13 views

Sudo behaves differently when -g is specified

I have a problem with sudo: This works: sudo -E -u technical_user id uid=500(technical_user) gid=500(technical_group1) groups=500(technical_group1),501(technical_group2) This doesnt: sudo -E -u ...
0
votes
0answers
21 views

Mouse left-click not working stably

I have read tons of sources to solve this issue but most of them didn't work while some of them would solve the issue temporarily. sudo modprobe -r psmouse Basically, removes the mouse driver from the ...
1
vote
0answers
14 views

Sudoers: alias already defined “<garbage>”

I defined the following file in /etc/sudoers.d/50-apps Cmnd_Alias APPS=/usr/bin/systemctl start app-*, /usr/bin/systemctl stop app-*,\ /etc/init.d/app1, /etc/init.d/app2 Cmnd_Alias ...
0
votes
0answers
10 views

Spawning child processes from root using runuser command

I am working as an intern for an online coding platform startup (similar to LeetCode or HackerRank). The backend is written in Nodejs. Instead of running the code in a sandbox of some sort, the lead ...
0
votes
0answers
16 views

How do I get Ubuntu to display permission errors when I forget sudo?

I've recently started working on a server running Ubuntu 14. Whenever I forget to use sudo for a command that requires elevated privileges, no permission errors are ever displayed. This is ...
0
votes
0answers
31 views

How do I copy file contents to a variable while using sudo?

I have a file that only has root permissions. I need to copy its contents into a variable in my script, but when I do content=$(sudo cat secretfile.txt) it captures the "last login" ...
0
votes
1answer
10 views

Does pam_cifscreds module work with sudo access?

I have an RHEL (7.9) server with a remote drive mounted as a multiuser CIFS volume. With multiuser CIFS shares, users need to execute an additional command (cifscreds add) in order to access it. This ...
0
votes
0answers
27 views

Mistake - sudo chown -Rh not-root-user /

Well that. Made a terrible mistake on ubuntu server 18.04 (production server) and ran chown -Rh some-not-root-user / Now sudo is not working. Is there any way to reverse this?
1
vote
1answer
34 views

how can i run "sudo -i' without truncating my .bash_history?

I want the same bash history for sudo as my normal user so I symlinked my local user to the /root/ dir. For whatever reason when I run "sudo -i" it truncates my bash history file to 1998 ...
0
votes
0answers
12 views

Dual boot: update broken Slackware install from working Lubuntu system

Lubuntu 18.04 and Slackware 14.2 (broken) on Asus L210 Slackware boot fails when processing usb devices, so I am attempting to update Slackware's packages from Lubuntu via chroot, using slackpkg as ...
0
votes
0answers
23 views

In linux, why am I suddenly supposed to use sudo for updatedb?

As far as I'm concerned, I was always using the updatedbcommand without sudo or root privileges but after having some difficulty changing my default shell from zsh to bash (I think that's when the ...
0
votes
0answers
8 views

Changing Hostname in sudoers file

So i got a sudoers file containing a NOPASSWD. Though somehow my laptop decides to change its hostname whenever it goes offline. (user hostname.home = (root) NOPASSWD: /path/to/smth/) I thought about ...
2
votes
1answer
105 views

Suddenly I'm not able to use sudo anymore

This happened on an up-to-date Ubuntu 20.04 system. Since today, I cannot use sudo on my laptop anymore. I'm using a standard user account created after Ubuntu install. I do not remember if I edited /...
0
votes
1answer
21 views

Left arrow key prints `^[[D` when I do `sudo su otheruser` on headless Ubuntu 18, via ssh using MobaXterm on Win 10. How do I move one char left?

I sometimes need to login as the application user to do some manual operations, debugging, or handling a failure. I don't want to go into our password management system to fetch the application user's ...
0
votes
0answers
64 views

Broke my sudo in Pop Os/Ubuntu, get segment fault error when trying to use sudo command

I was trying to make it so my computer would stop asking me for my password when ever I would run sudo commands so I copied this Ask Ubuntu answer: sudo nano -w /etc/sudoers (and enter your password ...
1
vote
0answers
94 views

FreeNAS remote shutdown

I want to write a program that remotely shuts down my TrueNAS server. When I enable sudo for the user myuser, the command ssh myuser@hostname -t "sudo poweroff" is actually enough. But I don'...
0
votes
1answer
20 views

usermod command is not working despite giving permission in sudoers file

i have given linda user to run 2 commands (useradd & usermod) from the sudoers file, i successfully ran the useradd command but the problem is i can not run usermod command, i have checked ...
0
votes
1answer
31 views

How can I make my own account a sudoers on VirtualBox?

I have Windows 10 installed on my computer. I installed Oracle VirtualBox and created a machine with Ubuntu 20.04. I need administrative privileges on this machine but, for some reason, I cannot have ...
0
votes
0answers
47 views

I broke Ubuntu's sudo by mistake

EDIT1: apparently it wasn't broken, I rebooted and sudo works now I was playing around with chezmoi dotfile storage management and at some point did chezmoi remove ~/.config thinking it would only ...
0
votes
0answers
33 views

Dist-upgrade command leads to black screen

I ran sudo apt-get dist-upgrade -y on kali linux Then I cannot even login in my machine. There is a black screen with blinking cursor. How do I solve this thing? I don't want to install My Kali Linux ...
1
vote
1answer
66 views

Why does `sudo` fail in a simple container on Fedora 32?

I am scratching my head trying to figure this one out. Under a freshly installed Fedora 32, the following minimal container does not execute properly: FROM centos:7 RUN yum install -y sudo && ...
0
votes
1answer
43 views

How do I regain Access to my admin setting in MacOS? (sudo commands work)

I recently changed my password, upgraded to Big Sur and enabled MDM, nad have run int to an issue of accessing Admin setting in the UI. I still have sudo access to become root on the command line. ...
1
vote
1answer
23 views

add password protection or prompt to certain bash commands

sorry if this has already been asked but i cant find an answer today I accidentally deleted a lot of sensitive work-related data cause i was absent minded... instead of typing "rclone ls s3-...
1
vote
2answers
47 views

I can not su or sudo -i as root, and also can not ssh as root.But they all can work with other users

The screenshot Doesn't work as root sudo -i and su can not work as root. [atguigu@hadoop103 ~]$ sudo -i [atguigu@hadoop103 ~]$ su Password: ssh login as root and it was closed instantly. [atguigu@...
0
votes
0answers
27 views

auto retry as sudo for visual studio code

If you ever tried using sublime in linux when ever you are trying to edit the file which you are out of permission for it, linux will ask your password to do it as sudo. But in vs code (visual studio ...
0
votes
1answer
17 views

running sudo commands with .bash_login

I want to run a few scripts when I start an interactive shell on my system. As I understand it, putting these commands in .bash_login should do the trick. Unfortunately, some of these commands require ...
0
votes
0answers
30 views

Debian 10.7.0 netinst install in CentOS 8.1 VM - no root or sudo access

I have a CentOS Stream 8.1 system with gnome-boxes (QEMU KVM) and installed a Debian Buster (10.7.0) VM using debian-10.7.0-amd64-netinst.iso. During the install I was prompted to create a user, but ...
0
votes
1answer
87 views

how do I run a sudo command and load the environment variables of current logged on user?

I need to run an ssh sudo command. command is as follows: ssh -i keyfile ubuntu@10.65.21.253 'sh -v /opt/dir/script' the script contains the following: sudo -E node some.js the reason I use the -E ...
-2
votes
1answer
41 views

Sudo commands just go to newline

When entering sudo commands, my system sometimes arbitrarily doesnt execute the command but goes to a newline. For instance, typing sudo apt-get update and hitting enter just goes to a blank newline ...
2
votes
2answers
126 views

Why is pulseaudio device missing when using sudo over SSH?

I'm trying to run an audio visualization python script on my raspberry pi over SSH. The script uses pyaudio for the microphone input, which I understand uses pulseaudio under the hood. The script is ...
-2
votes
2answers
192 views

How do I run a sudo command on a remote machine using ssh?

I am trying to remotely run a shell script on an ubuntu host. I can ssh to the machine using me@host just fine. On the remote machine I can run sudo commands without needing to input a password. I can ...
0
votes
1answer
42 views

How do I go about removing a built-in application on MacOS Catalina 10.15.6?

Here are the things I've tried... I'm within /System/Application, went into Finder and was able to change permission to custom and have set both Admin/Everyone to Read/Write. Disabled SIP Became root ...
0
votes
1answer
195 views

Alpine Linux: Error relocating libsudo_util.so.0 (sudo doesn't work)

I installed sudo to not having to use root all the time but after setting it up. Error relocating libsudo_util.so.0: reallocarray: symbol not found I checked /usr/lib/sudo but all the files and ...
0
votes
2answers
34 views

Getting back root permissions not working

I'm getting stick with Sudo permissions. Actually when I try to run any command using sudo sudo: error in /etc/sudo.conf, line 0 while loading plugin 'sudoers_policy' sudo: /usr/lib/sudo/sudoers.so ...
0
votes
0answers
14 views

WSL can't start as non-sudo user

In Ubuntu 20.04 under WSL 2 I've created a secondary user via adduser. Apart from primary user, which was created during Ubuntu's first run, this one is intentionally not in the 'sudo group'. ...
0
votes
1answer
37 views

FreeBSD: one-line command for an xterm window to sudo open an application, then close xterm whilst the app continues to run

I'd like GKrellMLaunch to: essentially, use sudo to open a GUI application – present an xterm window for entry of the password, then close the xterm window whilst the application continues to run. ...
0
votes
1answer
24 views

Recover Ubuntu file owners after improper use of chown

I made the mistake of changing the owner with the command sudo chown -R userG: userG / Now MySQL and other things not working, I try to repair but the ** sudo ** command does not work Give this error ...
1
vote
1answer
87 views

Ubuntu not giving root permissions to file, works on debian

I'm trying to make a program a privileged program by doing the following: sudo chown root sudo chmod u+s So now whenever someone runs , that user will be running that program with root privilege. ...
0
votes
0answers
8 views

Repeatedly encountering either IOError or OSError while using sudo and installing bpy

I was trying to install bpy using pip and it didn't work. A stack overflow answer led me to sudo pip install pync but now I get this code: Found existing installation: six 1.4.1 DEPRECATION: ...
0
votes
1answer
43 views

Linux Sudo NoExec breaks timeout command

I've been battling sudo into getting /bin/timeout to work alongside another permitted command. For instance, what I'm trying to do is: john ALL=(ALL,!ROOT) NOEXEC:NOPASSWD: /bin/timeout, /bin/xx then ...

1
2 3 4 5
21