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??
Asked
Active
Viewed 179 times
2
1 Answers
2
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:
Patrick Cook
- 6,365
- 7
- 37
- 63
-
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 '16 at 03: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 '16 at 08:24
sudodoes need to be done carefully, the recommendation is to usesudo -e /etc/sudoerswhich 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 theaddusercommand (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 '16 at 09:30