Questions tagged [sudo]

sudo stands for Super User Do. It allows users to run programs with the security privileges of another user (if configured access permissions allow it), by default the superuser and is therefore prefixed before commands when full access to the operating system is required.

Filter by
Sorted by
Tagged with
0
votes
2answers
12 views

Will RPi OS update `sudo` to address the recent vulnerbilities

There has been some traffic online this year regarding an apparently substantial vulnerability in sudo that allows unauthorized privilege elevation - CVE-2021-3156. I've been checking sudo --version ...
0
votes
2answers
28 views

How to run an application with elevated privileges [closed]

I have installed VS Code on my Pi. Now I see a problem, I cannot edit and save all the files. Like files that I used to update using nano editor inside the config folders, cannot be edited and saved ...
1
vote
1answer
16 views

How to configure sudo to ask for user password?

On Debian, sudo asks for user password by default. On Raspberry Pi OS, it doesn't. How to configure sudo to ask for user password?
-1
votes
1answer
89 views

Error in sudo code? E: Type 'sudo' is not known on line 2 in source list [closed]

So I'm very new to raspberry pi and Linux. I recently got a starter kit with some basic LED's and stuff and was trying to do some of the updates the tutorial was telling me to but every time I try to ...
0
votes
1answer
71 views

xdg-open chooses the wrong app

In a nodeJs app I have: //---------------------------- var execSync = require ('child_process'). execSync; function puts (error, stdout, stderr) {console.log (stdout)} function execute (comm) {...
1
vote
4answers
120 views

Edit file that requires sudo permissions from SSH client

I need to edit /boot/config.txt file from WinScp ssh client. In order to make changes in file I need root permissions for my login. As default pi does not have such permission and I don't have console ...
1
vote
0answers
28 views

Cannot list any files while root

I have a remotely hosted raspberry PI running Raspbian and Nginx and I want to modify the file /usr/share/nginx/html/index.html which is owned by root. I'm very much a beginner with Linux (I did use ...
0
votes
1answer
75 views

sudo “broken” - getting PAM error messages

I have a Raspberry Pi on my local network running Pi-hole. It's been all good for months, but suddenly I'm experiencing problems. When I'm logged into the RPI with ssh and try to do anything sudo ...
1
vote
1answer
137 views

sudo python3 generates error but python3 does not

I don't understand why "sudo python3 temphumlogger2.py" triggers a module error, while "python3 temphumlogger2.py" executes no problem. Outputs below, and code below that. I want ...
3
votes
1answer
360 views

Can't upgrade or install software. Get a strange error that says it failed to fetch data from a very sketchy website

When running the commands: sudo apt-get upgrade sudo apt install xscreensaver I get the error "Failed to fetch https://113store.cr/es/ Writing more data than expected (131072 > 121282)" at the end ...
0
votes
0answers
35 views

While using sudo command my python script crash

I am using LIRC 10.1-5.2 with Raspbian Buster, i need to map IR keys as keyboard input. I have successfully enable to setup IR receiver with the following guide (https://www.instructables.com/id/Setup-...
0
votes
1answer
47 views

Lost ability to authenticate software installation etc from GUI after deleting pi user. Can still install command line

In the interest of increasing security of my pi I followed the Secure Raspberry Pi Guide After doing so and deleting old pi user and rebooting I now cannot authenticate sudo from the GUI. For new ...
1
vote
1answer
225 views

Run Python RPi.GPIO as sudo

I'm trying to use the RPi.GPIO Library in a python-script with root-privileges. I essentially need to run it with sudo because other stuff in my script require root-privileges. When i try the ...
2
votes
2answers
63 views

accidently claimed /etc folder to my “pi” user, how can i revert it back?

So i ran into an issue and i needed to rewrite a file taht was in ETC file folder and the system wasn't allowing it. I claimed the whole ETC folder.. the file wrote fine after that. Now as i am using ...
0
votes
0answers
21 views

Is there a secure way to run a web interface that interacts with Serial/USB?

Terrible title but I will do my best to explain. I have a simple robot that uses an Arduino Uno plugged into the USB. To interact with this as serial it requires me to run the application under sudo. ...
1
vote
1answer
571 views

PIGPIO without sudo

I am working on setting up an automated deployment of an executable using the PIGPIO C bindings to a Pi Zero. I copy the executable to the pi (into a directory on pi user's desktop) as expected, but ...
0
votes
1answer
180 views

Changing Guest user permissions on Raspbian

I am new to this so hopefully, I am not breaking any rules and get the help I need. So, with my question, I made a guest user for siblings and other people, and I want to change permissions so they ...
11
votes
2answers
6k views

Sudo permissions disaster

I just got a Pi-4. I'm not sure if I did something wrong while setting it up, but after getting it running I noticed that sudo commands required no passwords. I tried to change this, following some ...
1
vote
1answer
1k views

sudo: command not found

My USB stick is now full of backups, and I need to delete at least one to upgrade Nextcloud. I cant. I try rm -f ./nextcloud-bkp_2017* and I get: rm: cannot remove './nextcloud-bkp_20171211.tar': ...
0
votes
1answer
1k views

RPi is not finding packages libapache-mod-php5 and php5

It is not finding these packages. Does anybody know why? It is not finding the installation candidate. Here is the result of sudo apt-get install libapache2-mod-php5 php5: pi@raspberrypi3:~ $ ...
1
vote
0answers
47 views

Server 19.10 on Raspberry Pi 4 defaults to root?

I've successfully installed Server 19.10, then got a desktop (Lubuntu) going on a single Raspberry Pi 4 (4gb). I went with the 32-bit version, having heard the 64-bit is not very stable. (Please ...
1
vote
2answers
281 views

python start on boot

i am trying to get my WS2812 NeoPixel python sketch to run at boot, i used a tutorial https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/ it install the correct files ...
1
vote
2answers
231 views

Installing Python 3.6: question about needing sudo command for configure command

I have a Raspberry pi 3 Model B and I want to install Python 3.6 on it. A bit of context: I acquired this Raspberry pi over 2 years ago and it came with Python 2.7 and 3.4 installed by default in /...
0
votes
0answers
149 views

PWM without root access (Navio2)

We use the Navio2 sensor hat from Emlid. These boards are used for a class where students develop flight software (not using Ardupilot or PX4). We roll our own framework which provides some basic ...
0
votes
0answers
1k views

Running NextCloud on HTTPS/SSL with LetsEncrypt

I have successfully installed Nextcloud on a Pi3 using snap sudo snap install nextcloud. Confirmation follows promptly: nextcloud 15.0.10snap3 from Nextcloud✓ installed . Now this tutorial: ...
2
votes
2answers
652 views

No sound as root and even with sudo su pi

It works if I try to play a sound/mp3 with mpg321 as a pi user: mpg321 Yeah-sound.mp3 but sudo -u pi mpg321 Yeah-sound.mp3 does nothing and sudo mpg321 Yeah-sound.mp3 leads to error Can't ...
-1
votes
1answer
716 views

sudo with WS2812 and Raspberry Pi

I'm trying to use the Neopixel Adafruit library with the WS2812 strip. Everything works great however there is something that I have not been able to do. I'm working on a project that requires ...
1
vote
2answers
365 views

Adduser command missing

I use rkhunter on all of my RPis, since some are used as dedicated servers, to try and ensure no rootkits or other malware are installed on them. When I did the check as usual today, I got the ...
1
vote
1answer
411 views

Segmentation fault when sudo su or other sudo commands

I wanted to update my SSL certs on my Pi 3B+ which is running NextcloudPi. I did not touch the Raspbian System on it for at least 2 months. I am the only one who is able to login. I connect via SSH ...
3
votes
1answer
848 views

Neither sudo apt-get upgrade nor sudo apt-get install vim working

I just started Raspberry pi and was ordered to get vim installed. However whenever I run sudo apt-get install vim I get the following errors: Err:1 http://raspbian.raspberrypi.org/raspbian ...
1
vote
0answers
161 views

How to run a graphical program from a restricted user

I have two users. admin can see everything. pi is restricted. I have a tkinter python application. pi must be able to run the program, but it cannot read any of the files directly. There is a data....
2
votes
2answers
3k views

Error in apt-get update

Whenever I run "sudo apt-get update" I get pi@raspberrypi:~ $ sudo apt-get update Hit:1 http://archive.raspberrypi.org/debian stretch InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian stretch ...
0
votes
2answers
62 views

I can not have the Permission ''sudo" to execute command lines on putty!

I have a problem for permission using "sudo" on putty (connected to raspberry pi3). My usrname is: karim My password: 0000 Each time, I have got this error when executing a command line " karim is ...
0
votes
2answers
163 views

uninstall a recently installed app

I installed lnd (lighgning network daemon) using the below command. sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-armv7-v0.5.1-beta/* What's the cleanest way to remove/rollback ...
3
votes
1answer
1k views

Start Service with Sudo

I am trying to run an Express API server with sudo permissions and have it automatically start on boot. The API needs access to bcm2835 library, and I get the following when trying to run node server....
0
votes
1answer
359 views

sudo startx broke my account

I wanted a font so I placed the .ttf in /usr/local/shared/fonts To do this I had to do sudo startx to give me super user. Now I wanted to check it worked so I rebooted and it asked me to login even ...
0
votes
1answer
51 views

RPi Unistalling All Upgraded Packages

After following this article, https://askubuntu.com/questions/101802/packages-having-unmet-dependencies-broken-packages, to fix an issue on my RPi when compiling QEMU, I ran sudo apt-get remove glib2* ...
1
vote
2answers
5k views

Accessing EXPORTED Environment Variables in Python

An often asked question, I know, but after searching through other solutions I'm still having problems. Most solutions say to make sure your variables are exported before trying to access them, but ...
2
votes
3answers
3k views

Run rpi_ws281x without sudo

I compiled the rpi_ws281x Library and the neopixel python wrapper following the instructions on https://learn.adafruit.com/neopixels-on-raspberry-pi/software Link broken try https://github.com/...
1
vote
1answer
96 views

How do I make sudo!! add a space after sudo?

When I type sudo!! it never puts a space between sudo and anything. How do I make sudo!! add a space? Example: nano text.txt sudo!! sudonano text.txt Maybe I am using it wrong but it never works ...
0
votes
1answer
126 views

How can I give write permission to “/mnt/pidrive1” path?

I have connected an USB drive with my Raspberry Pi following this tutorial. Everything worked fine but I'm not able to rename, delete or move/copy any files to a folder using SFTP. I'm only able to ...
0
votes
0answers
145 views

Problems with Raspberry Pi Configuration

i'm pretty new with Raspberry Pi. I tried to sudo raspi-config, but it tells me The boot partition is not mounted - cannot configure. Note that raspi-config is intended for use on Raspbian only ...
0
votes
1answer
606 views

Raspberry Pi Model 2B Hostapd installation error: Unable to locate package

So, I am trying to set up my raspberry pi model 2B as a wifi hotspot. All the articles recommended installing and using hostapd and dnsmasq. I was able to install the dnsmasq package without any ...
0
votes
2answers
505 views

Allowing uwsgi to make GPIO calls

I've got a Raspberry Pi Zero W acting as a Flask python server that listens for webhooks, then runs a function to turn on a motor until the GPIO pins read a certain combination of inputs. I used to ...
0
votes
1answer
2k views

Repairing Sudoers.so file permissions

I was messing around with permissions on my pi today and I managed to accidentally change the permissions on /usr/lib/sudo/sudoers.so to anyone can view anyone can write and nobody can execute. After ...
0
votes
0answers
155 views

Unable to start BlueJ as sudo

I am new to raspberry pi devices. I am using the minimal image of the raspbian image and access my raspberry pi zero w using MobaXterm client. The issue is, when I run BlueJ directly through terminal, ...
-1
votes
2answers
2k views

Sudo unable to resolve host name (none) [closed]

Any command I put into the LXTerminal of my raspberry pi, it says Sudo unable to resolve host (none) I can’t download anything, even Sudo apt-get update How do I fix this"?
0
votes
1answer
916 views

Sorry, user root is not allowed to execute '/usr/bin/python3 [closed]

I've created a startup script in bash that calls a Python script. However when I run "sudo sh StartUpScript.sh" from the command prompt it says: "Sorry, user root is not allowed to execute '/usr/...
0
votes
1answer
63 views

Joes has replaced visudo

The title says it all... but now I want the previous Raspbian versions' default behaviour i.e., visudo to be the editor for all users when editing the /etc/sudoers file. I'm using Raspbian "Stretch".
0
votes
1answer
802 views

Can't execute sudo apt-get update / upgrade

When i try to execute sudo apt-get update i receive the error: W: The repository 'http://linux.teamviewer.com/deb preview Release' is not signed. N: Data from such a repository can't be authenticated ...