Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

intimation of telnet or rlogin

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.
Prasad.
0
trpum1c1
Asked:
trpum1c1
2 Solutions
 
liddlerCommented:
put the command into each users .profile or .login depending on shell
0
 
sarda_rameshCommented:
.profile or .login file is executed each time a user logs in .. so by placing the command there ur prob can be solved

regards
ramesh
0
 
jimbbCommented:
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).
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
trpum1c1Author Commented:
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??
0
 
sarda_rameshCommented:
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

Regards
Ramesh
0
 
jimbbCommented:
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.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now