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 to secure /etc/passwd? I was reading I should remove accounts within passwd I don't need e.g. news, ftp, etc. Now what's the best way to remove it? Should I just comment the line e.g. "#" or remove it completely? Also is it best to backup this file and if so where?
I don't recomend you comment any lines in /etc/passwd. Usually, password are really being stored in /etc/shadow, since this is a more secure way to store them. They are also encrypted, so you don't need to worry.
Nevertheles, it's good to control the access to /etc/shadow since brute force rippers might try to retrieve the shadow file and try to decrypt the passwords in there.
Those accounts (mail, news, ftp, etc.) are jailed, that means they're only given permission to execute some services, programs or to access some ports. They are used by parent processes which uses those 'services'. You don't need to delete them. If you want to do so (it might affect some system services, if you use them) the best way is to issue an "rmuser mail" (i.e.) command as root.
If you take a closer look at accounts like ftp, news, etc., the password is an asterisk. This it used to prevent someone from logging on to the account.
bureado,
-> Those accounts (mail, news, ftp, etc.) are jailed, that means they're only given permission to execute some services, programs or to access some ports.
How are they jailed? I thought jailing wasn't a "natural" process and had to be enforced manually.
jschiwal,
--> If you take a closer look at accounts like ftp, news, etc., the password is an asterisk. This it used to prevent someone from logging on to the account.
I am aware they have an asterik however I am attempting to comprehend why would a security guide suggest I remove them.
"Jail" was not the term I must had used. I think it's ok to say that they're naturally harmless. Again, you should remove those who correspond to services you don't use. In example, I have removed "mail", "news", "ftp", since I don't run any servers of those.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.