New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"You do not have privileges to manipulate with the users!" on root superadmin #14433
Comments
|
Could you please post here the output of this SQL command (which you can run from the "SQL" tab anywhere in phpMyAdmin)?
|
|
|
I have the same issue running MySQL 5.6.39. |
|
I can not reproduce this issue, post output of (ADJUST the SELECT * FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES` WHERE `PRIVILEGE_TYPE` = 'CREATE USER' AND '''root''@''%''' LIKE `GRANTEE` LIMIT 1AND SELECT * FROM (SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`COLUMN_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`TABLE_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`SCHEMA_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES`) t WHERE `IS_GRANTABLE` = 'YES' AND '''root''@''%''' LIKE `GRANTEE` LIMIT 1Source
TestsI tried SHOW GRANTS;GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION
Port on local machine: 3307 |
|
I upgraded to 4.8.2 and the issue is back again. SELECT * FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES` WHERE `PRIVILEGE_TYPE` = 'CREATE USER' AND '''root''@''localhost''' LIKE `GRANTEE` LIMIT 1
SELECT * FROM (SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`COLUMN_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`TABLE_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`SCHEMA_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES`) t WHERE `IS_GRANTABLE` = 'YES' AND '''root''@''localhost''' LIKE `GRANTEE` LIMIT 1
|
|
I had the same issue and I fixed it by setting following option in
|
|
adding: |
|
To answer: SELECT * FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES` WHERE `PRIVILEGE_TYPE` = 'CREATE USER' LIKE `GRANTEE` LIMIT 1
SELECT * FROM (SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`COLUMN_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`TABLE_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`SCHEMA_PRIVILEGES` UNION SELECT `GRANTEE`, `IS_GRANTABLE` FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES`) t WHERE `IS_GRANTABLE` = 'YES' AND '''root''@''localhost''' LIKE `GRANTEE` LIMIT 1Produces:
|
|
I'm getting the same error: "You do not have privileges to manipulate with the users!" adding "$cfg['Servers'][$i]['DisableIS'] = true;" to the config.inc.php file did not work for me. Altho the PhpMyAdmin 4.8.0 changelog indicates (issue #13722) DisableIS is not fully honored. |
|
Per sabl0r, downgrading to PhpMyAdmin Version 4.7.8 removes the "You do not have privileges to manipulate with the users!" error. However, I still have no button to add users. Ran: SELECT `User`,`Host`,`Create_user_priv` FROM `user` WHERE `User` = 'root' AND Create_user_priv = 'Y'This produces: User Host Create_user_priv
root localhost Y
root 127.0.0.1 YRan: SELECT * FROM `INFORMATION_SCHEMA`.`USER_PRIVILEGES` WHERE `PRIVILEGE_TYPE` = 'CREATE USER' AND '''root''@''localhost''' LIKE `GRANTEE` LIMIT 1This produces an Empty Set Ran: SELECT * FROM (SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES UNION SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES UNION SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES UNION SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.USER_PRIVILEGES) t WHERE IS_GRANTABLE= 'YES' AND '''root''@''localhost''' LIKE GRANTEE LIMIT 1This also produces an Empty Set MySQL documentation indicates that the INFORMATION_SCHEMA pulls the Create User privilege info from the USER table -- so what's happening here? Ran: SHOW GRANTSThis produced this message: |
|
@feralreason: I'm sorry but I'm going to use your post as a 'template' for mine. Details and versions differ but I've taken the exact same steps. I'm getting the same error: "You do not have privileges to manipulate with the users!" Adding Ran: This produces: Ran: SELECT * FROM INFORMATION_SCHEMA.USER_PRIVILEGES WHERE PRIVILEGE_TYPE= 'CREATE USER' LIKE GRANTEE LIMIT 1This produces: Ran: SELECT * FROM (SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES UNION SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES UNION SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES UNION SELECT GRANTEE,IS_GRANTABLE FROM INFORMATION_SCHEMA.USER_PRIVILEGES) t WHERE IS_GRANTABLE= 'YES' AND '''root''@''localhost''' LIKE GRANTEE LIMIT 1This produces: Ran: This produces: |
|
No problem. I never tracked down the cause -- ended up doing a complete reinstall of XAMPP. That solved my problem. |
|
I've been granting, flushing, restarting and even rebooting my *** off but still the same. I can manage with MySQL WorkBench but it is quite disappointing to see PHPMyAdmin fail on this. |
|
Just a heads up: In my case it was related to the control-user having faulty configuration. |
|
Any other fix? Getting this :/ |
|
Can you show your current config? (with masked credentials of course)
|
|
I can confirm what @JarnoVgr said: this is an issue with a misconfigured control-user. In my case, I had to GRANT ALL PRIVILEGES ON `phpmyadmin`.* TO 'MyControlUser'@'MyHost' and FLUSH PRIVILEGES. |
|
Hello, i have this issue on verrsion 4.8.5. Any news on this if it should be fixed? regards |
|
The issue is still there using phpMyAdmin-4.8.5. Root user is not allowed to add users.
Setting "$cfg['Servers'][$i]['DisableIS'] = true;" enables creation of new users, but then I do not see all databases anymore. They are still there and applications can use them, they are just not shown in phpMyAdmin. So I need to set this option to manage users and then unset it again to manage the databases. This is really no suitable workaround. |
|
I just started having it happen, and 'DisableIS' allowed user creation, but some of my schemas disappeared in the list (command line says they're still there, though). |
|
The If it's any use I found this to be caused by incorrect phpMyAdmin (SQL) configuration. Turned out that the user I had created for this did not have database privileges assigned. As I was signed in as a super user I manually added the database privileges via the table directly, flushed privileges via the CLI, re-logged into phpMyAdmin then this was resolved. |
|
@AdamReece-WebBox And can you start a database server and recreate the issue from scratch ? |
|
I can't remove/recreate the MySQL server from scratch as it's on one of our production VPSes (currently hosting a pretty highly visited client website), though I can verify on both this and other similarly built VPSes that simply denying the assigned PMA user privileges it needs to the assigned configuration database causes this, after flushing privileges and re-logging into PMA of course. Perhaps when PMA has invalid configuration to use SQL based setting storage it blocks it from being able to determine the current user's privileges correctly? I also think that in my case it was definitely our fault for not giving the assigned PMA user the privileges it needed to work with the assigned database. (Not necessarily a PMA fault.) The only thing that led me on to this cause was the red error about configuration storage at the bottom of PMA's dashboard. (I should have noticed this earlier.) When I clicked through to find out why it wanted the database to be created, though it was very visible on the sidebar. However clicking into the "phpmyadmin" database then Privileges tab was also unavailable, so this needed to be done manually. Clicking through to the "mysql" database and "db" table the expected row for PMA's privileges was clearly missing. To resolve this I just inserted the intended row and flushed privileges, then when I re-logged into PMA as a super user it correctly let me manage user privileges. The VPS in question, and the 2 others I tried to reproduce it on are Debian (Stretch) based using MariaDB 10.1.38. They obtain PMA via Git using the "STABLE" tag, pulling it for updates on a daily basis. -- I also tried this on one of our Ubuntu (Bionic) VPSes running MySQL 5.7.26, and this issue occurred in the exact same circumstances. |
I should also add: my machine runs MariaDB on port 3306 and MySQL Community Ed on port 3308 (whichever ones shipped with Wampserver64 3.1.3, if that helps). All install options were the defaults. The issue cleared up for me with DisableIS and then returned again intermittently on MariaDB (and hasn't returned on MySQL, that I can see). However, there are a few schemas I can't see with DisableIS true. |
|
@williamdes I'd like to help out, but I'm going to need some assistance locating the files you need. the config.inc.php is easy. I'm running this mysql/phpmyadmin from a Jail in FreeBSD 11.2 and there is no /var/lib/mysql. I have a /usr/local/var/lib/ but no mysql folder there. Are you just needing the my.cnf file? I can provide that to you (with data redacted). |
@objecttothis Thanks From what I see on https://forums.freebsd.org/threads/moving-mysql-data-dir.3711/ the data folder would be
I would like to have everything (data and config) from the mysql server + |
|
@williamdes Found the directory. The problem I have now is that I have to remove all key pairs, certs and all the directories with database content other than the phpMyAdmin folder to maintain GDPR compliance. That doesn't leave a whole lot. Will that be enough for you? It does leave some error logs, etc. Also, tell me where you want me to send it if it will be enough. I'm not going to upload it here. Too much of a security risk. |
|
@objecttothis you can remove logs since they are not part of the state of the server I really want to be able to have the same issue when starting the server you can email me, and if you have a GPG key you can protect the data you send me :) |
|
@williamdes email sent. |
|
Well the way I continually reproduced the issue in 4.9.1 is to setup the phpmyadmin's controluser and pmadb. Grant the controluser all rights to pmadb but do NOT run the sql file to populate the pmadb with the tables required by phpmyadmin; leave it as a completely empty db. Then log into phpmyadmin from the web interface as the root user. Once logged in everything seems to work correctly (despite all the warnings about the pmadb) but for whatever reason since pmadb is an empty db you will be told you don't have privileges to manipulate users. Running the proper sql to populate the pmadb with the correct tables and then relogging fixes the problem. Almost seems like there is a query in the wrong place making the privilege check fail in a way that it shouldn't. |
|
Yep, I concur with @credomane. That exact situation happened to me only a couple of weeks ago when spinning up a Debian (9.9) VPS for a client. I just forgot to run the SQL script to import PMA DB. (Privileges were set correctly.) |
|
That fixed my problem, too. I already had a PMA DB and no warnings about it at all, but nevertheless I first tried dropping this DB and recreating it using the script. Sadly this did not fix the problem. Then I dropped the controluser (pma) and recreated it, and then the problem disappeared. |
|
Thank you @objecttothis the server you sent me has the issue. I apologise for making everybody here wait for a fix for a so long time but life goes so quickly :) |
Signed-off-by: William Desportes <williamdes@wdes.fr>
|
If everyone where can try my patch and comment or add a reaction to say it works ? The patch: b865011 and af344bb https://github.com/phpmyadmin/phpmyadmin/commit/b8650115be7cc2d79d231723b7a6f1961e834d27.patch and https://github.com/phpmyadmin/phpmyadmin/commit/af344bb4c1456fec5382a535733a2e3dddddbb8d.patch NoteEverybody who added ExplainedThe bug: |
Fixes: b865011 Signed-off-by: William Desportes <williamdes@wdes.fr>
Fixes: 83602a6 This is an unexpected change, detected by unit tests Signed-off-by: William Desportes <williamdes@wdes.fr>
…ate with the users!" on root superadmin" This reverts commit b865011. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Partially reverts commit 2bc8afe. Fixes phpmyadmin#15608 Related to phpmyadmin#14433 Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
|
This problem is still existing together mysqli::real_connect(): (HY000/1698): Access denied for user 'root'@'localhost' System: Ubuntu 20.04 MariaDB 10.5.3 PHPMyadmin Version information: 5.0.2 (up to date) adding solved the problem for now But the root user can't edit user priviledges
is working from shell but not in phpMyAdmin I can't even access the administration of a user in PHPMyadmin |
|
I encountered a similar issue on upgrading MySQL, despite convincing myself that I'd uninstalled and re-installed a later version. The issue was that MySQL kindly retained the databases in e.g. /var/lib/mysql, notably the mysql schema containing the user table. With the upgrade, new columns are added to this table: it seems that as a safety measure, the permissions are then reset, and need to be manually changed to 'Y' in the database from the mysql command-line console. |
I tried what you suggested and it's still showing the same error. |
How did you downgrade it exactly? |
|
Could you create a new issue @hacker-prime so we can find out and fix any left over of this complex issue ? |
Steps to reproduce
Created a local server of MariaDB via home-brew
Installed latest version of phpmyadmin
logged in as root with password
pma control user set up
No functionality to add users
Expected behaviour
Should see "add user account" button
Actual behaviour
No button and error:
"You do not have privileges to manipulate with the users!"
Server configuration
Operating system:
MacOS X High Sierra 10.13.5 (17F77)
Web server:$Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Apache/2.4.33 (Unix) OpenSSL/1.0.2o PHP/7.1.18
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 -
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 7.1.18
Database:
Server: 127.0.0.1 via TCP/IP
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.3.7-MariaDB - Homebrew
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)
PHP version:
phpMyAdmin version:
Version information: 4.8.2 (up to date)
Client configuration
Browser:
Safari: Version 11.1.1 (13605.2.8)
Chrome: Version 67.0.3396.99 (Official Build) (64-bit)
Operating system:
MacOS X High Sierra 10.13.5 (17F77)
The text was updated successfully, but these errors were encountered: