LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-23-2015, 04:10 PM   #16
netknights
LQ Newbie
 
Registered: Jun 2015
Location: Germany
Distribution: Mostly Ubuntu LTS
Posts: 8

Rep: Reputation: Disabled

Besides fail2ban, deny root login, use "limited shell"...
you could add two factor authentication to SSH.

Either use ssh keys, so that only login with ssh keys is possible or use other 2 factor authentication like privacyIDEA.
 
Old 06-26-2015, 04:22 PM   #17
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Rep: Reputation: 26
for ssh if you allow it, you modify /etc/ssh/sshd_config,
find the line that says PermitRootLogin and make sure 'no' is after it and not 'yes'.

you can edit /etc/securetty
I use SLES/SUSE and this file contains the device names of tty lines on which root is allowed to login.
mine is defaulted tty1 through tty6 and console. put a # in front of console to comment out that line, then the only way to gain root access is to switch user to root via su command.

in password file where it has the shell type for each user, such as /bin/bash,
you could set it to something like /bin/false but whether this will break your system or not i don't know. It would prevent anyone from getting root privileges including doing an su. I believe you would then have to have users listed in sudo or have specifically granted them certain elevated privileges before changing root's shell.
 
Old 06-27-2015, 12:22 AM   #18
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
I understand, It is possible but have some dangers.
I guess LQ must prepare a good document about Linux basic security.
 
Old 06-27-2015, 03:24 AM   #19
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by hack3rcon View Post
I know it is Odd but I don't like to have a default username in my system.
...which in the scheme of things means literally nothing. It would have been better / more efficient if you would have showed us what hardening you already have applied so we could efficiently correct and add to that.


Quote:
Originally Posted by hack3rcon View Post
Can anyone show me some quick guide about securing linux more?
- Determine the location, type and purpose of the machine because that dictates which security documentation you will need to read.
- Start with your Linux distributions user, admin and security documentation and apply. (For example if you use Debian you could start with this, if you use CentOS you could start with this and this.)
- Then see this and this.
- Then meditate on any per-service benchmarks Cisecurity provides for say MySQL, Apache etc, etc and this (, this) and this.
- Follow that up by running an OpenVAS scan, preferably from one location that is and one that is not in any /etc/hosts.allow, firewall whitelist or other network ACL.
- Rinse and repeat when making software, configuration or user changes to the system.


Quote:
Originally Posted by hack3rcon View Post
I guess LQ must prepare a good document about Linux basic security.
Put in some effort. You've been here long enough to know how searching LQ works. You could at least have found this.
 
2 members found this post helpful.
  


Reply



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
"Root" Domain Administrator Account Creation on a Samba PDC passedpawn1986 Linux - Server 2 09-23-2009 06:29 PM
"To add a new user account, log in to the root account" how do i do this (im new) pierce77x Linux - Newbie 4 12-28-2008 02:44 PM
Made LiveCD, root account "auto-logs in" but it shouldnt! un_pilote Linux - General 4 04-25-2008 07:31 PM
Root can log on, user account can't. "Error in service module" Charlie Spencer Linux - Newbie 3 09-13-2006 01:35 PM
[Redhat] make "admin" account same privledges as "root" Bi0haZarD Linux - Networking 20 01-12-2005 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:32 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