LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   SSH/Telnet, disable root login, how? (https://www.linuxquestions.org/questions/linux-security-4/ssh-telnet-disable-root-login-how-101992/)

muhazam 10-06-2003 08:03 PM

Hi,

We have an amature group of Linux admin, and we recently had a break into our Linux system - and we have just re-install everything. We have a reverse problem however (unlike Goma_2's). We are currently able to login as root via telnet or ssh. How do we disable it ?

And how do we disable root login directly at the terminal ? We remember that we managed to have a configuration where root cannot login directly at the ternimal or remote. But we also set a 'special' user that can su root and grab 100% of root privilages, while all other user aren't given 100%. We just forget how to redo this.

Can anyone help ?

Goma_2 10-07-2003 06:57 AM

muhazam, to configure from where root can log in, use the file /etc/securetty
here is an extract of mine:
#
# This file contains the device names of tty lines (one per line,
# without leading /dev/) on which root is allowed to login.
#
tty1
tty2
tty3
tty4
tty5
tty6
# for devfs:
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
#----------------------------------------------------------------

if u want to configure who can use "su", do it in /etc/sudoers. do man sudoers for more info.

unSpawn 10-07-2003 07:06 AM

Hi muhazam, welcome to LQ, hope you enjoy it.
One note: next time please make your own new thread, that way you can ensure your question gets the attention it needs.


We are currently able to login as root via telnet or ssh. How do we disable it ?
SSH: sshd_config: the "PermitRootLogin" directive (amateur or not, if you don't stick with SSH defaults and also don't read the manuals, then there's little hope...)
Telnet: ditch it. Period.
If "root" needs physical access to the box, then allow one console: echo tty1 > /etc/securetty, else $>/etc/securetty to clean the file.

muhazam 10-08-2003 11:28 PM

Hi, thanks for the responce from Mr....... unspawn ?

Editing the securetty file does not helps. Haven't tried the sshd_config yet either, coz..... yeah need to read manual first.

I think I can start making my own threads and there will be a lot of it later. For now (urgent) can anyone direct me to any page or website that list out each and everything that we must do to patch up all known possible security leak in a newly installed Linux ? Thanks.

hw-tph 10-09-2003 12:35 PM

Start out with bookmarking your distribution's security and errata pages and sign up to your distribution's security mailing list. And read those emails!

On the security/errata pages you will find info on all vulnerabilities that need patching.

hw

w_ashley 08-17-2004 04:02 AM

Hi,

NESSUS security scanner is said to be one of the TOP rated known security scanners available. The definitive security is prolly in many ways based upon what you have running on your system. However generally the streams would be

system used for connectiviity for larger net
points of interface with larger net
conditions for exchange for larger net
methods of exchange for larger net
data handling of conditions

next would be collatoral by mishap meaning closing off ability to perform functions beyond compromise or conditions of use.

If you examine each application from the kernel up you should be able to see the local usages and the larger net usages, at that point it is understanding what services are required or can be modified and what services perform to the function you required.

However there are allot of point of information on the net and new was of implementing things. However THE STANDARDS are all pretty basic by the time you understand the issues you should be able to modify the code to remove or neuter usages that are not optimal.

as for a full listing I havnt seen a central database yet however there are a large number of sites that address many .

makubex 08-17-2004 12:49 PM

hi....if u have ssh server running...
look into rc.sshd.....maybe in the /etc/rc.d/rc.sshd directory depends on your distro...
edit the file and uncomment the syntax
#PermitRootLoggin No


All times are GMT -5. The time now is 03:16 AM.