Operating System - HP-UX
1833541 Members
3096 Online
110061 Solutions
New Discussion

Telnet restriction for root

 
malki_3
Frequent Advisor

Telnet restriction for root

Hello everybody..!
I need to bar access over telnet for root. I try to do it by inetd.sec bat this solution can't let me use a login of user (for exemple root). It's posiible to use juse IP adresse or name of host. Can you give an idea for given a telnet resriction hrought a login of eache user
thinks for help
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: Telnet restriction for root

malki,

Read this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbdb879bffde7d4118fef0090279cd0f9,00.html


live free or die
harry
Live Free or Die
Santosh Nair_1
Honored Contributor

Re: Telnet restriction for root

You should be able to restrict root network logins by setting up the /etc/securetty file.

From the login(1) man page:

If the /etc/securetty file is present, login security is in effect. Only user root is allowed to log in successfully on the ttys listed in this file. Restricted ttys are listed by device name, one per line. Valid tty names are dependent on the installation. An example is

console
tty01
ttya1
etc.


-Santosh
Life is what's happening while you're busy making other plans
H.Merijn Brand (procura
Honored Contributor

Re: Telnet restriction for root

But be sure that 'su' is also protected. I can login over telnet as guest, but I'm not restricted to using 'su' with the '-' minus as first option.
Enjoy, Have FUN! H.Merijn
Jeffrey S. Sims
Trusted Contributor

Re: Telnet restriction for root

malki,

You can use the securetty file as stated above and to secure the su command you can create a group and make the su command only executable by people belonging to that group (so guests or other untrusted users cannot use the su command to gain root access). To do this just make the su command owned by root and group wheel (where wheel is your restricted group) and chmod 4550 /usr/bin/su (or where ever your su command is located). Then add the users that you want to allow su access and you should be good to go.

Hope it helps