The difference is the login session: in one case it originated from a terminal ("pts/<n>" is a terminal), in the other case it is from a network line. Only the latter carries an IP address because only here the login process (this is what ultimately feeds "who am i"s output) is aware that there is a network connection involved.
In the other case there might be a network connection involved too, but only to acquire a (virtual) terminal and then use this to log in.
If you need the IP address you are coming from inspect the established network connections, because regardless of the method there must be an established TCP connection behind every session.
I hope this helps.
bakunin
/PS:
This will not work if you use some "man-in-the-middle" to connect: some "putty" over Citrix or similarly working products will show you the IP of the Citrix server, not your own.
Last edited by bakunin; 10-28-2013 at 06:42 AM..
These 3 Users Gave Thanks to bakunin For This Post:
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi, everyone.
I need to write a program to get io info based on libperfstat.
But the "write time" of a disk is just half of the value get from iostat.
I'm confused and can't explain. Help please.
How I calculate "write service time per sec":
In iostat:
write service... (0 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Could you please let me know the following? I have to find and check first day of each month. I do
fdt=`date +%d`
will it give me on AIX
"1" or "01"
I ask you because I couldn't make real test on first day and don't know
Thanks for contribution (4 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT MINIX
rlogind
RLOGIND(8) System Manager's Manual RLOGIND(8)NAME
rlogind, in.rld - remote login server
SYNOPSIS
login stream tcp nowait root /usr/sbin/in.rld in.rld
tcpd login /usr/sbin/in.rld
DESCRIPTION
Rlogind is the server for the rlogin(1) program. The server provides a remote login facility with authentication based on privileged port
numbers from trusted hosts.
Rlogind listens for service requests at the port indicated in the ``login'' service specification; see services(5). When a service request
is received the following protocol is initiated:
1) The server checks the client's source port. If the port is not in the range 0-1023, the server aborts the connection.
2) The server checks the client's source address and requests the corresponding host name (see gethostbyaddr(3), hosts(5) and
named(8)). If the hostname cannot be determined, the dot-notation representation of the host address is used.
Once the source port and address have been checked, rlogind allocates a pseudo terminal (see tty(4)), and manipulates file descriptors so
that the slave half of the pseudo terminal becomes the stdin , stdout , and stderr for a login process. The login process is an instance
of the login(1) program, invoked with the -r option. The login process then proceeds with the authentication process as described in
rshd(8), but if automatic authentication fails, it reprompts the user to login as one finds on a standard terminal line.
The parent of the login process manipulates the master side of the pseduo terminal, operating as an intermediary between the login process
and the client instance of the rlogin program. In normal operation, the packet protocol described in tty(4) is invoked to provide ^S/^Q
type facilities and propagate interrupt signals to the remote programs. The login process propagates the client terminal's baud rate and
terminal type, as found in the environment variable, ``TERM''; see environ(7). The screen or window size of the terminal is requested from
the client, and window size changes from the client are propagated to the pseudo terminal.
SEE ALSO rlogin(1).
DIAGNOSTICS
All diagnostic messages are returned on the connection associated with the stderr, after which any network connections are closed. An
error is indicated by a leading byte with a value of 1.
``Try again.''
A fork by the server failed.
``/bin/sh: ...''
The user's login shell could not be started.
BUGS
The authentication procedure used here assumes the integrity of each client machine and the connecting medium. This is insecure, but is
useful in an ``open'' environment.
A facility to allow all data exchanges to be encrypted should be present.
A more extensible protocol should be used.
4.2 Berkeley Distribution May 24, 1986 RLOGIND(8)