Re: Telnet from Linux to SCO OpenServer 5.0.6

From: Brian K. White (brian_at_aljex.com)
Date: 04/30/03


Date: Wed, 30 Apr 2003 00:04:40 -0400


"Ian Wilson" <scobloke2@infotop.co.uk> wrote in message
news:b8le3m$l35$1@titan.btinternet.com...
> pierreforget wrote:
>
> <stuff about mapchan removed>
>
> >
> > Now, if I want to keep this permanent only for this Linux station, how
> > can I do this? All the stations or terminals get on with the same
login,
> > so if I modify the login, they other ones will be screwed up, if I
> > understand right.
>
> What are the values of the TERM variable? When I login at a Linux
> console and telnet to a SCO OSR505 box then I get TERM=linux (which
> OSR505 complains about since I haven't imported a terminfo entry)
>
> You can use TERM in an if statement in the .login or .profile (depending
> on login shell) to conditionally execute the appropriate commands.
>
> > All these machines or terminals have a fixed IP address. Will the same
> > machine always logon to the same ttyp?
>
> No, ttyp numbers are allocated on a first come first served basis. You
> may be able to find the client IP-address. Many Unixes (but not OSR505)
> show your client hostname/IP-address in the who command (e.g. who -u on
> Linux). Probably theres some way on OSR505 to take the PID from who -u
> and use another command to link that to an IP-address. A bit of shell
> scripting will do the trick I expect.

who -umx

better yet:

------snip------
#!/bin/ksh
#
# tellip - "Tell IP"
# prints the IP or Hostname that the user is connecting from.
# mostly used in other scripts to determine non-static addresses.
#
# can be run on SCO, Linux, FreeBSD
#
# Brian K White - brian@aljex.com - Aljex Software

# facetwin screws up "who" so try to use facetwin variable instead.
[ -n "${FACETWINIPADDR}" ] && { echo "${FACETWINIPADDR}" ; exit ; }

# "who" tries to show hostname but chops long names, try to use ssh
variable.
[ -n "${SSH_CLIENT}" ] && { echo "${SSH_CLIENT}" |awk '{print $1}' ; exit
; }

case `uname -s` in
  Linux) who -m |cut -d\( -f2 |cut -d\) -f1 ;;
  FreeBSD) who |cut -d\( -f2 |cut -d\) -f1 ;;
  SCO_SV) who -umx | awk '{ print $6 }' ;;
esac
------snip------

>
> > Unless I create another login specifically for this Linux machine?
Which
> > would include the reference to the right mapchan?
>
> If all else fails. Checking the TERM variable looks the best way to me.
>
> --
> Ian Wilson.
>



Relevant Pages

  • Re: Telnet from Linux to SCO OpenServer 5.0.6
    ... > Now, if I want to keep this permanent only for this Linux station, how ... > so if I modify the login, they other ones will be screwed up, if I ... When I login at a Linux ... and use another command to link that to an IP-address. ...
    (comp.unix.sco.misc)
  • Re: Linux authentication via AD
    ... Primarily I need to integrate Linux ... servers, but I do have a few OpenBSD servers. ... > a way to do this under older AIX) allows people to login authenticating ... > text passwords authenticate to the Windows Password Server as well. ...
    (comp.os.linux.security)
  • Re: linux to unix
    ... becuase I only can login and use my applications. ... we can migrate our clients to linux. ... I have found that several SCO Unix text mode applications ...
    (alt.os.linux)
  • Re: Linux Samba on Win2K AD Domain
    ... I'm not very familiar with the Novell SuSE product, ... X login manager and xok group ... >> I have recently installed Suse Linux 9.1 on my new notebook. ... >> to be able to login against my Windows 2000 domain. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Linux Samba on Win2K AD Domain
    ... I'm not very familiar with the Novell SuSE product, ... X login manager and xok group ... >> I have recently installed Suse Linux 9.1 on my new notebook. ... >> to be able to login against my Windows 2000 domain. ...
    (microsoft.public.windows.server.security)