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.
Potentially, but if you check your /etc/shadow file (assuming you are using shadow passwords), you should see that most of these accounts do not have passwords. Your safest best, afaik, is to set all non-user accounts (eg: apache, irc, man, etc.) to use /dev/null instead of /bin/sh or other. Make sure you also have /dev/null listed in your /etc/shells file. Here is what my (snipped) /etc/passwd looks like:
Originally posted by paddyjoy So if there is no password in /etc/shadow the user can't log in?
Paddy
False. If your mysql user has a shell of /bin/sh, and I exploit mysql with shell code that executes /bin/sh, then I get dropped into a shell as mysql. Therefore I am logged in as mysql, even though the user mysql has no password.
Thanks, I think the safest thing to do is to set all the users to /sbin/nolgin except for the ones I want to allow login. I was just worried coz I get so many script kiddies hitting my server trying to log in as users like mysql, postgresql etc. . . . . .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.