System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Executing script/command after Telnet login

 
jerry_barajas
Occasional Visitor

Executing script/command after Telnet login

Hello Folks,

We have a server with HP-UX (HP-UX favc B.11.11 U 9000/800 146404690 unlimited-user license) that is used as a bridge to another server. It is very old.

 

this server operates as the following way:

 

  • Any user must login using a telnet client.
  • All users use Widnows as their OS.
  • When any user logs in via telnet a menu appears. 
  • This menu allow users to do some things such as connecting to another server, print some information, etc.

 

I'd like to replicate this configuration in another server, but I cannot find the way to do this. 


I've checked the '/etc/profile' file and the '.profile' for every user but I cannot find any reference to the telnet's behaviour.

 

Please point me to the right direction. Thanks for your time.

 

 

 

5 REPLIES
Steven Schweda
Honored Contributor

Re: Executing script/command after Telnet login

   I know nothing, and many things are possible, but...

 

> Any user must login using a telnet client.

 

   Does that mean that a connection made using rsh/remsh or ssh does not
lead to this menu program/script?

 

   If it _is_ Telnet-specific, then I'd look at /etc/inetd.conf to see
what gets run when a Telnet connection is attempted.

 

    In desperation, I might look at "ps" output to see what's running
when this menu thing is operating, and then start looking for _it_.

Patrick Wallek
Honored Contributor

Re: Executing script/command after Telnet login

I would check the default shell in /etc/passwd for the users.  It may be that the default shell is the menu system script rather than a real shell (like /usr/bin/sh, /usr/bin/csh, etc.).

Steven Schweda
Honored Contributor

Re: Executing script/command after Telnet login

> I would check the default shell in /etc/passwd for the users. [...]

 

   Or that. Step one is to determine (or reveal) whether the key fact
is Telnet, or a particular set of users, or what.

RenatoMartini
Frequent Advisor

Re: Executing script/command after Telnet login

 

Probably the menu application is a simple shell script, that is loaded through the passwd file (as said), check out it, it will pointed to the script filename...

 

 

--Renato Martini (Brazil)
http://renatomartini.net
http://www.iti.gov.br
uxbeginner22
Trusted Contributor

Re: Executing script/command after Telnet login

Telnetd (configured by inted.conf on hpux) is calling an alternative login program(a script)

On linux i have this line,check for similar on your hpux server

 

telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd -L /usr/local/bin/alternative.sh