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
0 answers
19 views

Cannot run PulseAudio as root (sudo)

I have developed a console application in .net 6 which uses a library that needs direct access to the gpio-pins of the Pi. The Pi is running the latest Pi OS Lite x64. Edit: This is the library ...
Jan's user avatar
  • 1
2 votes
0 answers
76 views

sudo ./install.sh cant run the script [SOLVED] [closed]

Using RPi 4 model B Rev 1.4, Raspberry Pi OS. I'm trying to install MCC's DAQ hats. I have the followed all the instructions but when I try to run, sudo ./install.sh I get the following, sudo: ./...
DrBwts's user avatar
  • 197
0 votes
1 answer
365 views

Fix "sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

on an r-pi 4b running raspbian buster... I accidentally set the owner of /usr/bin to pi ... Now I don't have sudo (as per title). I also don't have a root password for su. nor can I start in ...
bitrat's user avatar
  • 9
0 votes
1 answer
196 views

Reenabling Raspberry Pi passwordless sudo

I am running Bullseye with non "pi" account and wanted to require my user to always type in a sudo password. I used sudo visudo -f /etc/sudoers.d/010_pi-nopasswd and changed myaccount ALL=(...
sdencar's user avatar
2 votes
1 answer
146 views

Boot order breaking due to automount (running into emergency mode)

I have a Raspberry Pi running Raspbian GNU/Linux 10 (buster). The Pi is running on a microSD-Card with a read-only boot partition and activated overlay-filesystem (both is currently deactivated for ...
eDonkey's user avatar
  • 175
0 votes
0 answers
81 views

Errors Changing /boot/config.txt externally

I was overclocking my pi, and I went a little overkill, so now it wont boot. Im trying to change config.txt back to its previous state externally, but I don't have the permissions to do it. I tried ...
Fred Daws's user avatar
2 votes
2 answers
95 views

Sudo still works despite removing my user from group

I just installed the April 4th 2022 edition of Rasberry Pi OS and added a root password in addition to my user password. I also did.. deluser <userme> sudo I tested my new security adjustment ...
user12711's user avatar
  • 177
0 votes
1 answer
197 views

Trying to kill all processes, but new processes keep spawning

I'm trying to rename the default pi username after getting a new raspberry pi 4. I am completely new to Linux, so my knowledge of the matter is small. From what I've discovered, one way to rename pi ...
Gabe Morris's user avatar
0 votes
1 answer
151 views

Can I access the keyboard in a virtual environment that was not created with sudo?

I have a script which uses the arrows on the keyboard to provide user input. The script required the keyboard package to be installed with pip install keyboard. The script works fine outside the ...
kimv's user avatar
  • 165
0 votes
2 answers
98 views

Any way to get sudo privleges without opening a command line in raspian? [closed]

Right now to get python scripts to run with user privleges in thonny with typing in this command from the command line: sudo thonny I can't close the command window without it closing thonny also Is ...
Voltage Spike's user avatar
1 vote
2 answers
131 views

Configure RasPi 4 for headless operation [closed]

I'm trying to run a Pi 4 headless as I don't have the microusb cord available. In /boot, I ran touch ssh then created wpa_supplicant.conf and with the modified contents: country=US ctrl_interface=DIR=/...
hrokr's user avatar
  • 119
2 votes
1 answer
153 views

GUI password prompt replacement for gksu won't work via SSH

Since gksu has been deprecated, I'm using the following script which emulates it using pkexec: #!/bin/bash PKEXEC_USER="root" while [[ $# -gt 0 ]]; do key="$1" case $key in ...
Dmitry Grigoryev's user avatar
0 votes
1 answer
115 views

ClassNotFound when sudo java

I have a computer lab which is set up with piserver and 3B+ raspberry pis. I want my students to be able to write java code that will use the GPIO pins, so they will need to sudo java their programs. ...
KsMomOf2's user avatar
0 votes
1 answer
145 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 ...
Simple Simon's user avatar
5 votes
5 answers
13k 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 ...
Dan's user avatar
  • 59
0 votes
3 answers
11k 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 ...
Victor Mouries's user avatar
-1 votes
1 answer
100 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 ...
MichRX7's user avatar
  • 51
0 votes
1 answer
506 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?...
horsey_guy's user avatar
9 votes
4 answers
4k 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 ...
Seamus's user avatar
  • 20.3k
0 votes
2 answers
289 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 ...
Kangkan's user avatar
  • 398
2 votes
1 answer
1k 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?
sunknudsen's user avatar
0 votes
1 answer
485 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) {...
Poul Christoffersen's user avatar
1 vote
4 answers
1k 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 ...
vico's user avatar
  • 161
1 vote
0 answers
39 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 ...
d0m0's user avatar
  • 11
0 votes
1 answer
668 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 ...
Roy Solberg's user avatar
1 vote
1 answer
1k 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 ...
mechoption's user avatar
3 votes
1 answer
1k 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 ...
Nolan's user avatar
  • 33
0 votes
0 answers
115 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-...
user8761396's user avatar
2 votes
1 answer
116 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 ...
user avatar
1 vote
1 answer
1k 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 ...
Phil Noderer's user avatar
2 votes
2 answers
670 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 ...
EmpireLearning's user avatar
0 votes
0 answers
44 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. ...
Jackie's user avatar
  • 171
2 votes
1 answer
2k 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 ...
RedBassett's user avatar
0 votes
1 answer
781 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 ...
Achak Claw's user avatar
10 votes
3 answers
8k 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 ...
Absurdistan's user avatar
1 vote
1 answer
4k 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': ...
user256787's user avatar
0 votes
1 answer
3k 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:~ $ ...
DeepCreek23's user avatar
1 vote
0 answers
54 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 ...
147pm's user avatar
  • 121
1 vote
2 answers
431 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 ...
Gordon Fleming's user avatar
1 vote
2 answers
642 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 /...
mf94's user avatar
  • 113
0 votes
0 answers
257 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 ...
Shawn Herrington's user avatar
0 votes
0 answers
2k 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: ...
Peete's user avatar
  • 11
2 votes
3 answers
1k 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 ...
United121's user avatar
  • 141
-1 votes
1 answer
1k 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 ...
Andy's user avatar
  • 1
1 vote
2 answers
641 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 ...
NathanielJS's user avatar
1 vote
1 answer
665 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 ...
Danveloper's user avatar
3 votes
1 answer
1k 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 ...
Breakpoint's user avatar
1 vote
1 answer
217 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....
tyjkenn's user avatar
  • 163
2 votes
2 answers
5k 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 ...
user96931's user avatar
  • 729
0 votes
2 answers
127 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 ...
Karim Dabbabi Dabbabi's user avatar