I want to let one of my friends use my Raspberry Pi remotely, but I don't want him to have access to raspi-config to change settings. Is there any way to block access to raspi-config or set a separate password??

  • 1
    You could and probably should create a new user account for him. Without sudo privileges or limited privileges he wont be able to access raspi-config. You may need to grant him sudo privileges if he needs to access the GPIO pins. Jan 20, 2016 at 1:02
  • Tweaking sudo does need to be done carefully, the recommendation is to use sudo -e /etc/sudoers which invokes a consistency check on a temporary edit version, only replacing the real file if it makes sense. This can help you to avoid locked yourself out of the system. As @SteveRobillard suggests a separate account is really sensible - check out the adduser command (needs root privileges) - Unix always was multi-user system from the ground up (unlike certain products from Redmond in the US of A) and remote access by others is well within capabilities of a RPi *nix distribution.
    – SlySven
    Jan 20, 2016 at 9:30

1 Answer 1


You may want to add a new user like Steve said, and revoke sudo privileges from that user. Here is a quick tutorial on this:

sudo useradd USERNAME

Obviously you need to replace USERNAME with the name of the user you want. Then, you will need to set a password for that user with:

sudo passwd USERNAME

If you do not set a password the user will be locked until you do. Then, to revoke privileges:

sudo deluser USERNAME sudo

This will remove the user USERNAME from the group sudo.

Here are some complete tutorials, just in case:

  • Have you actually tried this. Last time I did (a long time ago) you had to specifically add groups to the new user.
    – Milliways
    Jan 20, 2016 at 3:33
  • Only if you want that user to be a member of those groups. There will be a new group added for it automatically (see man useradd).
    – goldilocks
    Jan 20, 2016 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.