05-14-2003
Host IP address for a telnet session
I am using Tru64UX 5.1a on alphaserver 4100.
Users access the application through Telnet sessions to this server.
My requirement is to limit the users login through their PCs only.
Is there any way I can accomplish this on the unix box ?
I want to include a script in the .profile ( or /etc/profile ) of each user and get the IP address of the PC from where he is trying to come, compare it with a list of valid IP adress for that user and allow if he is validated with the right IP and terminate if the IP address is not validated.
Thanks in advance.
9 More Discussions You Might Find Interesting
1. Programming
Hello Experts,
Happy New Year to all of us,
In AIX 4.3.3 I am trying to figure out how is possible to find out the IP address that a telnet session - user uses to login in to host machine. My objective is by finding the login IP address to allow the user to login or not.
All users uses the... (6 Replies)
Discussion started by: sszago
6 Replies
2. UNIX for Dummies Questions & Answers
hi, we can set something such that if the user has been idle for a while, it will auto disconnect. where to do so? thanks (6 Replies)
Discussion started by: yls177
6 Replies
3. Shell Programming and Scripting
Dear friends..
Our project has a module that runs on handheld devices. Through the handheld we telnet to solaris where the application actually runs. I noticed that after starting a session through the handheld, if i go out of range or if i remove and replace the battery in the handheld, the... (1 Reply)
Discussion started by: deepsteptom
1 Replies
4. Shell Programming and Scripting
{
sleep 2
echo "$user"
sleep 2
echo "$password"
sleep 2
echo " ls"
sleep 10
echo "exit"
}| telnet $server
I have a machine x and i have executed the above script on machine 'x'.
i entered the... (6 Replies)
Discussion started by: pathanjalireddy
6 Replies
5. IP Networking
The situation:
a Unix system (UnixWare 7.1.3) to which are connected other systems;
various p.c. on the LAN that they connect Unix to the system via TelNet.
The problem:
I need to intercept the address IP of the p.cs. connected via telnet to the Unix system.
Particularly, I have to know the... (2 Replies)
Discussion started by: paololrp
2 Replies
6. UNIX for Dummies Questions & Answers
Hi
Is there any way whilst in a telnet session you can view your client machine name that you are using to connect to the Unix box ? :eek: (2 Replies)
Discussion started by: mlucas
2 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have AIX 5.3 at home connected to netgear router. Port Forwarding has been enabled on the router. Problem is that if I want to telnet, I have to try 2 or 3 times before I can get a logon prompt. It times out for first or second time (Connection to session <IP_Address> failed: Connection... (1 Reply)
Discussion started by: bluebee
1 Replies
8. UNIX for Dummies Questions & Answers
How can I disconnect an existing telnet session? The host is a serial port server with multiple ports. The users login using the host's name and a port, i.e. telnet host01 1235.
Thanks. (14 Replies)
Discussion started by: cooldude
14 Replies
9. HP-UX
Our network administrators implemented some sort of check to kill idle sessions and now burden is on us to run some sort of keep alive. Client based keep alive doesn't do a very good job. I have same issue with ssh. Does solution 2 provided above apply for ssh sessions also? (1 Reply)
Discussion started by: yoda9691
1 Replies
LEARN ABOUT MOJAVE
profile
profile(4) File Formats profile(4)
NAME
profile - setting up an environment for user at login time
SYNOPSIS
/etc/profile
$HOME/.profile
DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence.
/etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement
of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special
actions for the root login or the su command.
The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical
(except for the comments):
# Make some environment variables global
export MAIL PATH TERM
# Set file creation mask
umask 022
# Tell me when new mail comes in
MAIL=/var/mail/$LOGNAME
# Add my /usr/usr/bin directory to the shell search sequence
PATH=$PATH:$HOME/bin
# Set terminal type
TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid
while :
do
if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ]
then break
elif [ -f /usr/share/lib/terminfo/?/$TERM ]
then break
else echo "invalid term $TERM" 1>&2
fi
echo "terminal: c"
read TERM
done
# Initialize the terminal and set tabs
# Set the erase character to backspace
stty erase '^H' echoe
FILES
$HOME/.profile user-specific environment
/etc/profile system-wide environment
SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5)
Solaris Advanced User's Guide
NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most
global needs.
SunOS 5.10 20 Dec 1992 profile(4)