Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-24-2009, 02:10 PM
|
#1
|
Member
Registered: Mar 2009
Posts: 33
Rep:
|
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash
/etc/passwd:
Code:
mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash
- What does this mean?
- Why do people often advise to set to /bin/false, but did that crash my Nagios until I gave it /bin/bash again?
- Mysql user has no password set. Only users with /bin/bash (or /bin/sh etc) and a password set can log in via SSH, can they?
Just looking to understand Linux Security.
|
|
|
04-24-2009, 02:16 PM
|
#2
|
Member
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270
Rep:
|
It's safe like that.
At times you may need to su to that user to debug also. Just leave no password and it will be fine.
|
|
|
04-24-2009, 02:21 PM
|
#3
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
What you're showing is a simply "user" entry in /etc/passwd. The user name is mysql. The comment has mysql as well. It might as easily have been named ralph or wilhelmina.
Typically if it is not a real person it is an "administrative account". That is to say an account that was created simply to be the "owner" of files for a specific application. In this case it is most likely mysql based on the name and comment.
The reason people recommend setting the shell to /bin/false is that for administrative accounts you often don't want a real user to login to that account. Setting it to /bin/false makes any login attempt faile and exit immediately.
Sometimes you DO want another user (nagios for example) to be able to switch user (with the su command) to this user. If it is set to /bin/false then that su will fail because it tries to invoke the shell.
Setting a password on the account that no one knows helps to insure no real user will login to the account. You can then use something like ssh trust to allow the nagios user permission to run commands as mysql. Also you can setup sudoers to allow real users to "sudo su" to the admin user. We do quite a bit of the latter as there are many administrative accounts our DBAs need access to but we won't to log access which sudo does by default.
|
|
|
All times are GMT -5. The time now is 05:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|