What is "superuser" and how do I get that privilege?
Matthew Martinez
I'm attempting to manually configure dpkg due to package manager warning.
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.I enter the code.
dpkg --configure -aAfter entering the above command I receive the following response
dpkg: error: requested operation requires superuser privilegeMy questions are. What is a superuser? How do I get that privilege? or is there another way to configure dpkg?
3 Answers
root (superuser) is the user on the system who has all permissions.
You gain superuser rights for the duration of a command by prepending sudo in front of the command you want to execute (if your user is in the sudo group).
sudo dpkg --reconfigure -aEnter your password when prompted.
The "superuser" is user "root" on Linux systems. It's the "god in the system", it has full privileges to do everything. All other users don't have those rights, and only admin users have the right to use sudo to run commands as root user.
If a command needs root rights, you must run it with sudo like this:
sudo dpkg --configure -aThat will ask you for your user password. Note that no characters are echoed, not even asterisks, when you type in your password.
Basically there are three different types of users in Linux (Ubuntu).
- Root user, which is the super user / administrator / or whatever you want to call it
- Service users, which are hidden non-login users that are used by services such as Apache web server. These users can't login and can't be used by you to login.
- Normal users, which are any other users. This kind of user can be either a sudoer or a non-sudoer.
Initially logging in as the root user is disabled by default in Ubuntu. Instead you can use your normal user which has permission to run the sudo program which makes it possible to execute commands as another user, including as root.
Example:
apt-get install SOME_APPThis will raise you an error of permission denied. So you have either to be a root or use sudo:
sudo apt-get install SOME_APPwill work.
So back to your error, you should run it with sudo as below:
sudo dpkg --configure -aRelated links: