User can access all Databases

8 posts / 0 new
Last post
#1 Mon, 07/28/2014 - 08:09
jurik

User can access all Databases

Hi,

I've researched for the whole of the last week and still struggling to find a solution.

I've got Virtualmin installed on Ubuntu 12.04 Apache2 Server. Everything works fine apart from phpMyAdmin and Chive have full access to all MySQL databases whenever I log in with the virtualserver default username.

Under Virtualmine->User Edit the default user name show “All” under “Database?” column. I can create a new user and allocate only one database access but I cannot edit the default user.

How can I restrict default user to only virtualserver database it belongs to?

Please help me resolve this.

Many thanks

Mon, 07/28/2014 - 22:44
tpnsolutions
tpnsolutions's picture

Hi,

That's very interesting, as Virtualmin typically creates a database user per virtual server when the feature is enabled, then creates all other databases for that virtual server using that individual user.

This method effectively restricts access to databases to individual users, unlike what you're saying.

I'd be happy to take a peak into your system if you'd like to see what might be causing this problem.

Feel free to drop me a line to schedule some time if you're interested.

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Tue, 07/29/2014 - 07:04
Locutus

With "default user" you mean the virtual server owner user?

When you go to "Webmin -> Servers -> MySQL Database Server", you can check under "User Permissions" and "Database Permissions" which MySQL users have what effective permissions on what database.

Can you verify what users have which permissions there?

Under "User Permissions" you should see all the virtual server owner users (and those you manually created), with "Permissions: None". Then under "Database Permissions" you should see entries allowing each user access to their appropriate databases.

Tue, 07/29/2014 - 12:12
jurik

Peter, thanks for the office, I appreciate it but I've fixed it now.

Locutus, you were absolutely right, the User Permissions had everything selected. I've de-selected all of it so it shows "Permissions: None" and it worked. I'm no longer able to see all databases only the ones that belong to the virtualservers.

Thanks Locutus, really appreciate your help.

Juri

Tue, 07/29/2014 - 12:19
tpnsolutions
tpnsolutions's picture

Hi,

Awesome!

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Tue, 07/29/2014 - 12:39
Locutus

Very good!

There remains the question why those users had access to all databases. When you create a new virtual server now, does its owner user get the proper access rights?

Tue, 07/29/2014 - 18:22
jurik

It was my stupid fault. I've remembered playing with those permissions when you've mentioned it.

I will be more careful next time. I'm a newbie to Virtualmin.

Thanks for your help

Wed, 07/30/2014 - 03:30
Locutus

Okidoki, you're welcome and no problem! We were all newbies at some point! :)

Topic locked