Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

RE: Watching my Users

by httptech (Chaplain)
on Jun 18, 2000 at 15:47 UTC ( [id://18709]=note: print w/replies, xml ) Need Help??

in reply to Watching my Users

It might also be useful to know who is using the machine:
#! perl -w # # A quick and dirty way to tell if someone is messing with My Computer +s use Net::SMTP; use Sys::Hostname; use Win32; $host = hostname; $user = Win32::LoginName(); $smtp = Net::SMTP -> new(''); #Connect to a mail serv +er $smtp -> mail( ''); #Sender's name $smtp -> to(''); #Receivers name $smtp -> data(); # Send the header $smtp -> datasend("To: myemail\\n"); $smtp -> datasend("From: theiremail\\n"); $smtp -> datasend("\n"); # Send the Body $smtp -> datasend("$user is using $host"); $smtp -> dataend(); $smtp -> quit;

Replies are listed 'Best First'.
RE: RE: Watching my Users
by Poetic Justice (Monk) on Jun 20, 2000 at 03:46 UTC
    Thanks for the comment. I've inherited this system from a previous sysadmin and his policy was very loose. Once I implement my new security measures, I'll be able to extract the user name from their login. When I fix the code, I'll repost.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://18709]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-06-19 14:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.