Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deny a particular user's login

I have phpmyadmin 3.4 installed on Ubuntu.

Now I simply want to disable a user (such as theuser) logging in through the phpmyadmin page, and in the meantime, allow the user logging in on localhost. Is there a way?

like image 226
Nathaniel Ding Avatar asked May 27 '15 03:05

Nathaniel Ding


People also ask

How do I prevent others from signing in on Windows 10?

Press Win+R, enter “netplwiz“, which will open the “User Accounts” window. Netplwiz is a Windows utility tool for managing user accounts. Check the option for “Users must enter a username and password to use this computer” and click Apply. That's it.

How do I restrict a remote desktop user to a single application?

Click Start > Administrative Tools > Remote Desktop Services > Remote Desktop Session Host Configuration. On the Edit Settings pane, under General, double-click Restrict each user to a single session.


1 Answers

If you can find your config.inc.php in your installation, under the config for your particular server, add this

/* block SOME users */
$cfg['Servers'][$i]['AllowRoot'] = false;
$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array(
    'deny theuser1 from all',
    'deny theuser2 from all'
);

This will disable using phpmyadmin as root, theuser1 or theuser2. Nothing else changes.

like image 89
commonpike Avatar answered Nov 18 '22 01:11

commonpike



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!