I've installed GUI on CentOS 6.5 with
yum groupinstall basic-desktop desktop-platform x11 fonts
but now when I attempt to use GUI Package Manager (Add/Remove software) to install packages, it asks me for root password and does not accept sudo user password. How to cure this behaviour?
I can install packages with sudo yum install
in a normal way.
Unlike Ubuntu, CentOS allows you to actually run as the root user if you so-choose (with Ubuntu there's a number of steps to enable root direct login).
So, you have to specify the root password to elevate yourself in the GUI. If you run X as root (which you really, really shouldn't do) it doesn't prompt. The other way would be to run the package manager from a Terminal like:
sudo pirut
(pirut is the package manager under most CentOS versions that I'm ware of).I'm assuming you're launching the GUI from a system menu when logged in as your non-privileged user. In this case, the program launches as your user ID, and it asks for elevated permissions in order to run the install as root. This is the expected behavior. If you want to use the sudo password, you will have the launch the GUI from a command line via sudo, the same way you run
yum install
through sudo.