intimation of telnet or rlogin

Posted on 2003-02-25
Medium Priority
Last Modified: 2012-05-04
i have made a script in which i used the w command and by grep and cut got xconfirm to display the user and the terminal he is logging from.
But how do i prompt the script to run every time a user logs into the system by telnet or rlogin there by displaying to me who had logged in the system.My systems are on Irix.6.5.11
i read in solaris manual that u can get messages in console if someone logs in - i will try that but i wanted to incorporate use of xconfirm in notification of remote login.
Question by:trpum1c1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 18

Accepted Solution

liddler earned 100 total points
ID: 8015548
put the command into each users .profile or .login depending on shell

Expert Comment

ID: 8032312
.profile or .login file is executed each time a user logs in .. so by placing the command there ur prob can be solved


Assisted Solution

jimbb earned 100 total points
ID: 8035286
I don't know what xconfirm is or does, but are you depending on this script for some security-sensitive application?

If you put that command into each user's .profile/etc. then the user could just as easily remove it.  A better way would be to put it into a globally-sourced script; however, that also won't work if you have any users with other shells (or if they are allowed to change their shells).

IMHO, your best bet would be to monitor your authentication logs (which probably already include the username and tty information, which you could just cut out).
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 8040198
hi liddler/ramesh --
   putting the command in .profile or .login will run the script will help but will it intimate the users if he is not opening a new shell for some time??

Expert Comment

ID: 8040400
the file .profile or .login is executed every time the user is logged in .. so every time the user logs in , the commands will be executed. Similarly the file .bashrc is executed every time the user changes his shell (assuming bash sheell).. so if u want ur commands to be executed every time the user changes shell put in the .bashrc file


Expert Comment

ID: 8043159
More accurately, .bashrc is executed anytime the user starts bash as an interactive non-login shell.

These details are all in the bash man page.

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question