LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-18-2015, 09:20 AM   #1
neopandid
Member
 
Registered: Aug 2011
Location: Russia
Distribution: Debian
Posts: 32

Rep: Reputation: Disabled
How to allow jailed ssh user to access mysql database


Hello,
I have tens of jailed ssh users to their respective home folders.
They share the same group name.
They can't run any anything other than ls.
I want one of them run mysql commands. She has a dedicated mysql user and I want her to run commands like mysqldump or altering tables.

Is this possible?
My three day google search journey didn't give me anything.
Thanks in advance.
 
Old 09-18-2015, 09:45 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
By definition a jailed user can only run things in the jail.

This means to give her access to commands you'd have to copy them into relevant subdirectories of her jail. e.g. to use mysql which is in /usr/bin/mysql you'd have to copy it to <jaildir>/usr/bin.

However, your larger problem is having the commands is of no benefit unless she can access the database itself and the only way to do that would be to put it in the jail as well. (Not an issue if she is the only user of the DB but if it is your main DB it is an issue.)

What you might consider instead of jailing this particular user is to give her a regular login and use sudo to let her access the things she needs.
 
  


Reply

Tags
jail, mysql, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to create a jailed ssh user with Jailkit on Debian Wheezy LXer Syndicated Linux News 0 09-26-2014 07:40 AM
DBI connect failed : Access denied for user 'root'@'%' to database 'mysql' kwickcut Linux - Software 11 02-10-2012 02:26 PM
Can't access to a user jailed by Jailkit arepo21 Linux - Software 1 10-07-2010 09:40 AM
mySQL deny user access to database blizunt7 Programming 3 10-10-2007 09:34 AM
Restoring MYSQL database without SSH shell access hct224 Linux - Newbie 5 01-08-2004 06:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration