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

Permission denied for GUI operations

Running Raspbian on RPi B+, I can sudo in command mode and do all operations like deleting a directory, etc. But when in GUI mode I get permession denied, although I am using the same user in both ...
1
vote
1answer
5k views

Accessing gpio not working as non-root. “Can't open /dev/mem: : Permission denied”

I am attempting to get a c++ program to access the gpio as non-root. I am on a raspi 2 running Jessie. I followed the instructions on issue: Access GPIO pins without root. No access to /dev/mem. Try ...
0
votes
1answer
56 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".
1
vote
2answers
36 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
43 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
1answer
231 views

How to add user to GUI sudo list?

When I run GUI programs like gparted or the GUI package manager, it allows me to enter the password for root or pi when it requires sudo privileges. How can I add a user to this list? I added a user ...
0
votes
1answer
441 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
1answer
914 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
1answer
202 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 ...
0
votes
0answers
195 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: ...
1
vote
1answer
388 views

How to stop halt/reboot over VNC asking for password

Since upgrading to the latest version of Raspbian, I've been having some problems with using it through TightVNC. I set up tightvncserver using the instructions in the official Raspberry Pi ...
0
votes
1answer
45 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* ...
2
votes
3answers
666 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/...
0
votes
1answer
218 views

pi not belonging to sudo and adm will sudo anyway

I don't want pi to be able to use sudo on a recently installed Raspbian on PI 3. I made the following unsuccessful attempts: removed pi from sudo group (and made sure it indeed does not belong to it)...
5
votes
2answers
2k views

Why does sudo not work in this case?

I was playing with the raspberry pi leds (How do I control the system LEDs using my software?) Interestingly, on my pi the following command fails: sudo echo heartbeat >/sys/class/leds/led0/...
2
votes
2answers
104 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 ...
2
votes
2answers
885 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 ...
1
vote
2answers
124 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
140 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 ...
2
votes
1answer
341 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 ...
2
votes
1answer
589 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....
1
vote
1answer
169 views

Removing sudo from Pi default user

I have strange bahaviour from my Pi. My /etc/sudoers looks like: # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead ...
1
vote
0answers
87 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
15k views

Sudo has stopped working : sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy'

I have a weird issue with my Raspberry pi - sudo has stopped working. Every time I try to run a command using sudo, i get this: sudo: error in /etc/sudo.conf, line 0 while loading plugin `...
0
votes
2answers
45 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
1answer
2k views

How do I grant sudo privileges to an existing user?

I am using vnc viewer on Windows 10. user: pi I am lost, please help. What I Have Tried: *sudo chmod 777 ** also .. sudo nano /etc/sudoers adding the following line just like "root ALL=(ALL:...
0
votes
2answers
49 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 ...
1
vote
2answers
4k 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
4answers
7k views

How to solve “Encountered a section with no Package: header” error?

I am running a bunch of class Raspberry Pi computers behind a school proxy. I'm using Raspbian off a very recent NOOBS image. The internet connection is supplied through the school WiFi and after ...
0
votes
1answer
842 views

Sudo unable to resolve host name (none)

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"?
4
votes
1answer
4k views

How can I connect to the SFTP server with sudo via WinSCP?

I want to use WinSCP to connect to the Raspberry Pi standard SFTP server. I also need to have root access. How can I do this without logging in as root (using sudo)?
0
votes
1answer
204 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 ...
7
votes
3answers
10k views

Can't access shared libraries when running with sudo

I'm trying to get a demo working writing PCM to the I2S; I've created a small demo program that gives an error when I run with the following command ./demo stereo_small.wav can't open /dev/mem So I ...
1
vote
1answer
80 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
39 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 ...
13
votes
5answers
129k views

How to change user pi sudo permissions; how to add other accounts with different permissions?

Since I occasionally use my Pi over SSH, I have learned that it is dangerous to allow SSH to access sudo commands. Thus, I plan to turn off this permission in the near future. But, when I install ...
0
votes
0answers
121 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 ...
2
votes
4answers
5k views

sudo apt-get not working

I was trying to install re2c but terminal replies the following: sudo apt-get install re2c Reading package lists... Done Building dependency tree Reading state information... Done The ...
0
votes
2answers
300 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
0answers
88 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, ...
4
votes
1answer
9k views

Pi3 “unable to resolve host” message

I have a message saying:"sudo: unable to resolve host (myhostname)" each time i write a command. My hostname do not contain any capital letter or number. thank you
1
vote
2answers
1k views

Python doesn't recognize cv2 when running under sudo

I've installed opencv with python 2.7 using this tutorial. I've created a test python file and everything works fine. But when I try to run it as sudo, it throws an error: ImportError: No module ...
0
votes
1answer
648 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/...
2
votes
2answers
14k views

sudo error - “Structure needs cleaning”

On my Pi Zero, if I issue a sudo su I get the following: $ sudo su sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy' sudo: /usr/lib/sudo/sudoers.so: Structure needs cleaning ...
0
votes
1answer
606 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 ...
1
vote
1answer
621 views

Run shell script from PATH using root

I have added a shell script to my ~/bin folder. When I type the script name normally in the terminal it finds the script just fine. However, when trying to launch the script using the sudo prefix, I ...
1
vote
1answer
1k views

Raspberry Pi 3 with Ubuntu 16.04.3 LTS sudo apt-get update exits with dpkg error code (1)

I'm running a Raspberry Pi 3 with Ubuntu 16.04.3 LTS xenial. sudo apt-get update exits with: dpkg: error processing archive /var/cache/apt/archives/linux-firmware_1.157.11_all.deb (--unpack): trying ...
2
votes
0answers
811 views

run startx not as root

Scenario: So I want to run startx. The problem is, it won't let me write to tty0 Fatal server error: (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied) so I tried to run sudo startx, ...
-1
votes
1answer
211 views

List of common alias commands [closed]

I had/have Raspbian and used the LXDE desktop environment. Many posts will commands to enter in and not use the GUI. I took a quickie online video crash course on using linux and being an admin. ...
6
votes
4answers
14k views

Disable sudo for user Pi (or require root password)

I'm pulling my hair out over this thing. Using Raspberian here. So I'm trying to restrict the Pi user from being able to use sudo without the root password. After heavy searching, I gave up on that, ...