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
1answer
34 views

'sudo' not recognized as an internal or external command. Trying to run sudo raspi-config

I am building my first project on a Raspberry Pi 3 using an RFID HAT for Raspberry Pi. I am using Windows 10 IOT Core. The manual for the RFID HAT begins with this: I2C/Serial interface is disabled by ...
2
votes
3answers
491 views

update problem with apt-get after new install of OS

When ever I try to go to recommended updates I get the following error and I don't know how to fix it. I had a boot problem before I reinstalled the operating system. Thank you ahead of time for your ...
0
votes
0answers
27 views

'on_picture_save' triggered script won't execute 'sftp' nor 'sudo -u' commands

My goal is to transfer to a distant raspberry pi the stream of snapshots acquired through 'motion' software. I am using 'sftp' in the following test script: (test-script.sh) #!/bin/bash cp $1 /tmp/...
0
votes
2answers
439 views

sudo apt-get update problem

I was trying to update my RPI. $sudo apt-get update , and this was my result: Reading package lists... Done E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable ...
-1
votes
1answer
15 views

OpenCV not working when ran with sudo

I have an application that uses OpenCV, and now want it to also access GPIO pins, so it needs to run as sudo. So, I tried to run it using "sudo python3 myapp.py" When I do I get the ...
1
vote
1answer
64 views

sudo make install error [closed]

I'm fairly new to Raspbian and raspberry pi 3 is in my hands. I'm following along a book in which I have to install some packages of OpenCV. My project is related to Machine/Deep learning. My code is ...
0
votes
1answer
74 views

Can't run `apt --fix-broken install` as normal user

`apt --fix-broken install E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?...
9
votes
4answers
3k views

Will Raspberry Pi OS update `sudo` to address a recent security vulnerability?

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
44 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
61 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?
0
votes
1answer
175 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
394 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
30 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
169 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
408 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
493 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
57 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
68 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
455 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
189 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
23 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
1k 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
314 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 ...
10
votes
3answers
7k 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
2k 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
2k 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
49 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
316 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
361 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
192 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
786 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
879 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
425 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
476 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
979 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
180 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
4k 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
66 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
206 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
2k 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
419 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
52 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
6k 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 ...
3
votes
3answers
4k 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
108 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
157 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
149 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
667 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
559 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 ...