1833749 Members
2811 Online
110063 Solutions
New Discussion

Restricting Root access

 
Steve Massey
New Member

Restricting Root access

Hi

How can I stop root telneting directly into a box, I prefer a su to root.

Steve

4 REPLIES 4
eRT
Occasional Advisor

Re: Restricting Root access

YOu can set up the /etc/securetty file. All that needs to be in this file is the word console. This will only allow root to login at the console. Anyone telnetting in will have to do it as themselves and then su to root. I hope this helps.
Eric J. Gonzalez
Occasional Advisor

Re: Restricting Root access

Once the /etc/securetty is created and have the word console in it, do
chmod 600 /etc/securetty this will prevent
users from removing the word console from the file.
Brian M. Fisher
Honored Contributor

Re: Restricting Root access

Another good idea is to add root to /etc/ftpusers this file should contain the user names of all administrative accounts to prevent direct ftp access.

Brian
<*(((>< er
Perception IS Reality
Rick Garland
Honored Contributor

Re: Restricting Root access

May not be exactly what you are looking for, but...

You can prevent root logins by a tty or you can prevent all root logins (or a subset of)
through the use of sudo.

Direct root logins can be allowed only on the console (or where ever you choose) and other locations must su to root. Need to have the root passwd and not be restricted by the sudoers file.