Hardware: Raspberry Pi Model B.
OS: Raspbian (Latest version as of this post)
- This is a fresh install of the OS on the Raspberry Pi model B. It did ask for a password on install and I gave it one. I also used the following from a command prompt to make sure a root password was set:
sudo passwd root
- I've searched the forums and the web for solutions to this problem and have only found forum entries where the solution was never posted or made clear.
Raspbian never asks me for a password when I request elevated privileges either from the command prompt via the "sudo" command, or from the "Run" text entry box (by pressing "ALT+F2", or navigating from the Main menu to "Run") and entering "gksu appname" where appname is any application I wish to run using elevated super user privileges.
What I expect to happen:
When I enter "sudo appname" from a command prompt I expect to be asked for the root password, AND, when I use "gksu appname" from the "Run" menu I expect a window to pop open asking me for root privileges before the program referred to by 'appname' is run.
What happens instead:
If "sudo appname" is used, then whatever command is replacing the 'appname' placeholder here is run with elevated administrative privileges without ever asking me for the root password. If "gksu appname" is used, the program referred to by the 'appname' placeholder is run with elevated administrative privileges without ever asking me for the root password.
- I've installed Raspbian 3 times and each time this problem has occurred. Why is Raspbian installing with very poor security measures and allowing the default user to run any program with root privileges without ever asking for the password?
- If for example I install Ubuntu on a desktop computer, it asks me to create a username and password combination from which the OS sets up an administrative account using that information, and by default if I need to run something with elevated privileges it always asks me for the root password before doing so. The part where it asks for a password is not happening in Raspbian, how can I get that behavior by default in Raspbian?
- I haven't changed any configuration files, this is a fresh install, and this problem was happening both BEFORE and AFTER I ran the "sudo passwd root" command. What could be causing the behavior described in the problem description above and why would this be happening after a fresh install of the OS each time I install it?
This is where things stand now:
Raspbian never asks for a password ever, and runs all programs requesting elevated privileges as such without passwords.
This is how I would like things to be:
Whenever any command asks for elevated privileges via either "sudo" or "gksu" I would like Raspbian to ask me for an administrative password before running that command, and not to run that command if a password is not given or is given incorrectly.