Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restrict login by name and IP address

Status
Not open for further replies.

pulsar1

IS-IT--Management
May 24, 2006
32
0
0
US
Does anyone have any thoughts on a way to restrict a telnet login from a specific ip address, to only a given user name or names.
 
I do something similar by having in /etc/profile a section which uses
[ol]
[li]$LOGNAME to find out who the user is[/li]
[li][[ $(ps -p $PPID|awk 'NR==2 {print $4}') = telnetd ]] to check for telnet access (I'm not interested in ssh or su)[/li]
[li]'who' to check for the source IP Address - but you have to pin this one down using the tty command[/li]
[/ol]
And only if the relevant conditions are met are they allowed to log in.

Ceci n'est pas une signature
Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top