LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-05-2001, 10:24 AM   #1
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Rep: Reputation: 15
Question Securing root access


I was told that there is way to disable remote root access.
example .
when user telnet to <ipaddress>
user can only login with a normal user then su it to root.
but with telnet to <ipaddress>
and login as root . will be denied.

How can i set that up.?

thx in advance. for sharing
 
Old 12-05-2001, 11:28 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
The file is called /etc/securetty. It lists the (virtual) consoles root is allowed to log in at.
Commenting out will disable a tty/virtual console, deleting the file will disable root logins completely.

Did someone already lecture you on the security problems you face when using telnet? :-]
I mean, even logging in and su-ing to root won't help, because *all* your communications tru telnet can be read.
I would like you to consider using Ssh/sshd if you value your box(en).
 
Old 12-05-2001, 04:57 PM   #3
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Original Poster
Rep: Reputation: 15
But how to deny the telnet connection?
I have sshd and i always used it.. and telnet just running like normal is there anyway i can disable it?
 
Old 12-05-2001, 05:28 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
edit the disable = no to yes in /etc/xinetd.d/telnet
 
Old 12-05-2001, 06:18 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...OTOH, if you're referring to this threads starting question, and so only want to deny *root* access to telnet:
Telnet doesn't send username "in advance" like ssh does (ssh -l username), so the server doesn't know who's overthere untill you provide a username to login with, so using a line like
"in.telnetd root@somehost"
in /etc/hosts.deny (for TCP wrappers-aware apps) wouldn work (right, anyone?).
Ok, so when connecting, telnetd "hands over" control to pam/login for authorization, and here pam kicks in (/etc/pam.d/login, first line) if no "ttyp*" lines are available in /etc/securetty, to deny a direct root login.

Just my 2K of worthless dot-com options.

Last edited by unSpawn; 12-05-2001 at 06:23 PM.
 
Old 12-23-2001, 02:28 PM   #6
vcheah
Member
 
Registered: Nov 2001
Distribution: redhat 8.0
Posts: 110

Original Poster
Rep: Reputation: 15
still doesn't work
i rename the securetty to securetty.bak for future usage
and change the /etc/xinetd.d/telnet - disable to yes
then telnet quetec- login root... still can login..
 
Old 12-23-2001, 03:03 PM   #7
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
for a properly constricted root login, i'd recommend:

adding
Code:
account    required     /lib/security/pam_access.so
to /etc/pam.d/login, and then editing /etc/security/access.conf properly. the pam.d line forces all logins to be pushed through the access module, which is controlled by that conf file. I sussed this out as my housemates refused to change terminal to one dedicated to them when they wanted to check their mail, so i made it so it was impossible for them to log in on any other:

+:emma:tty4
+:katie:tty3
-:sarah:ALL EXCEPT LOCAL
-:cake:ALL

so emma can only log in on tty4, katie on tty3, sarah anywhere locally (cos she'd my fiance...) and then the last line defines the group their all in, and refuses login, if it login didn't get picked up already.
 
  


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
How Do I Get Root Access? Norab Linux - Software 5 08-28-2005 11:50 AM
am i able to access root? smay LinuxQuestions.org Member Intro 1 08-24-2005 10:32 AM
Root Access un shiza Linux - Security 12 03-30-2005 07:46 PM
No root access James McGee Linux - General 6 09-24-2004 08:47 PM
Securing a system and its SSH install for access from the outside TheOneKEA Linux - Security 4 07-07-2004 03:27 PM

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

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