Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

This seems odd to me. I can't install software using the "friendly" GUI tool unless I input the root password but by default, my Ubuntu 12.04 has root disabled with no password set.

Why doesn't Software Centre use a SUDO credential? Perhaps using gksudo?

share|improve this question
It asks for your user password not for root's, root does have no password. – Uri Herrera Jun 27 '12 at 22:09
Software Centre does normally use sudo type requests before any software install. *Have you modified your setup or root user is some way? – david6 Jun 28 '12 at 5:00
AFAIK only to allow my normal ID to SUDO without a password – Julian Knight Jun 28 '12 at 7:16
I started having the exact same problem. I can use sudo from the cli just fine, but when running Ubuntu Software Update, it's asking me for root password. – rcourtna Jan 17 '13 at 3:41
I never did find a proper answer to WHY it was doing this I'm afraid. I simply put a password on root and it worked OK. – Julian Knight Jan 18 '13 at 21:45

2 Answers 2

up vote 3 down vote accepted

This happens (at least on 14.04 which I've just tested on) when there are no users in the "sudo" group.

It doesn't matter if your user is explicitly listed in the /etc/sudoers file or not as to this behaviour -- it looks for members of the sudo group and requests a password for one of those users. If there are no members in that group then it requests the root password, which may not be enabled at all.

Edit: This is probably because the sudoers file is unreadable by normal users, but the list of members in the sudo group *is* possible to access.

share|improve this answer
Ah, good call David. Seems as good an answer as any so you may as well get the points! – Julian Knight Nov 20 '14 at 23:54
In my case, my user is a member of the sudo group, I have added %sudo ALL=(ALL) NOPASSWD:ALL to /etc/sudoers, so that no password is requested for the members of the sudo group, I am able to run sudo commands on the terminal without a password being asked, and still Ubuntu Software Center is asking me for my password (the current logged-in user's password, not root's) to install/upgrade software. – jeckyll2hide Jun 25 at 7:19
It turns out this is controlled by policykit, not by sudo/gksudo – jeckyll2hide Jun 25 at 8:11
@jeckyll2hide Yes, policykit looks at the sudo group and decides whether to use gksudo or gksu on the gnome desktop. It probably assumes that no-one in the sudo group is allowed to sudo without a password, hence still prompting when NOPASSWD is specified. The javascript(?) used by policykit should have the logic in for this and make it more obvious. – David Gardner Jun 25 at 13:34

I have never seen Ubuntu Software Center ask for a root password. It's not supposed to, and it won't happen unless you do something special to your system. What is supposed to happen, is that it uses Policy Kit, which will ask you to select a user and enter a password for that user.

PolicyKit is much more suitable for this than gksudo, since sudo will allow access to commands, whereas PolicyKit allows access to actions such as org.debian.apt.install-or-remove-packages. If instead you provided access to run apt-get, then you could do anything apt-get can do, which is way too much power. You might, for instance, grant permission for all users to install security upgrades from official Ubuntu archives, but not allow the user to install new software. That wouldn't be possible to do with sudo.

I would check to see if you've removed the package policykit-1-gnome.

share|improve this answer
No, policykit-1-gnome is installed. Every time I try to install anything, it asks me for the root password. I could only install from the command line until I added a password to root. I have changed SUDO so that my normal user login isn't asked for a password when doing SUDO - would that effect it? – Julian Knight Jun 27 '12 at 22:33
Thanks for the info re policykit. I've mainly used Debian and SUSE in the past so I'm happy with command line installs but it bugs me why Software Centre isn't working as expected. – Julian Knight Jun 27 '12 at 22:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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