Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What's the best way in centos to block a user from accessing mysql. I don't want him to be able to run the mysql command, so just putting passwords up in mysql is not good enough. Mysql is running ad user=mysql, and i added the user in a different group by he is able to access mysql by typing in the command.
How can i block this command being availible for this user.
You probably just need to change the permissions on the mysql binary so that normal users can't run it. So if you changed mysql to something like 750, only the owner and accounts in the proper group could run it. What are the current permissions on mysql?
Also, to be honest, if you can't trust this user and want to lock him out of a certain command, you might want to start worrying about what else he may be doing that you aren't currently aware of. Guttorm has a point, too...how far do you want to take it?
What's to stop him from compiling a mysql client and run it from his own home directory? Or simply copy it from a different computer?
Trusted Path Execution, RBAC etc, depends if the server is properly configured.
Don't really use MySQL, but couldn't you also bind to socket and change permissions on it too.
Could also RSH the user so can only exec certain commands in a chroot(if they connect via SSH).
Last edited by nitrogendizzy; 02-21-2011 at 07:45 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.