Operating System - HP-UX
1844255 Members
2943 Online
110230 Solutions
New Discussion

blocking root access from a telnet session

 
SOLVED
Go to solution
Bob_16
Frequent Advisor

blocking root access from a telnet session

i want to block root access from a telnet session. the admin must be at the console to login directly as root. however i want to telnet with a valid username, then execute su to root when needed.

is there a console=/dev/console parameter i could set for this?

thanks
5 REPLIES 5
Jeff Schussele
Honored Contributor
Solution

Re: blocking root access from a telnet session

Hi Bobby,

Create a file in /etc called

securetty

And in that file place the word

console

And only that word.
Then set perms on /etc/securetty to

-r--r--r-- root:sys

This will allow root logins ONLY from the console

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Michael Tully
Honored Contributor

Re: blocking root access from a telnet session

Sorry, the permissions should be '400' we don't want write permissions, and only 'root' should be able to read it.
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: blocking root access from a telnet session

Hi,

What your looking for is to have root only login directly from the console.

# echo "console" >>/etc/securetty; chmod 700 /etc/securetty ; chown root:sys /etc/securetty

You might wish to invest some time into installing 'sudo' as well. You can get it from here: http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.6/

HTH
Michael
Anyone for a Mutiny ?
Bob_16
Frequent Advisor

Re: blocking root access from a telnet session

thanks! for the quick response, that's amazing.

i've set this up on a test box, and it does what i want. too bad hp-ux doesn't convey a message like solaris stating you are not at a console, but i can live with that.

thanks again.
Jeff Schussele
Honored Contributor

Re: blocking root access from a telnet session

That's amazing Michael!
You corrected yourself before you even answered =~)

Hee..hee..hee,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!