The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

scripts to check shell access

Discussion in 'General Discussion' started by Kailash1, May 27, 2007.

  1. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    I need a script which suppose to send mail whenever shell access of any of the accounts have been changed. Can someone help me to develop such script?

    Thanks,

    Kailash
     
  2. ceobryan

    ceobryan Registered

    Joined:
    Apr 26, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    You got to be kidding me. If you cant figure out how to do a dif on a file and or write a simple shell script, then dont ask. You will probably overwrite your /etc/passwd file and hose the server all up.
     
  3. Fernis

    Fernis Well-Known Member

    Joined:
    Oct 28, 2006
    Messages:
    192
    Likes Received:
    1
    Trophy Points:
    18
    Easy with the flames ceobryan. That was uncalled for.
     
  4. matthewdavis

    matthewdavis Well-Known Member

    Joined:
    Jun 26, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    NC, USA
    Why reinvient the wheel? A simple script would suite your needs. But it'd require having to keep a md5 sum of the file stored somewhere or some other means to verify the file contents haven't changed.

    What i'd recommend is getting a script like csf which has this functionality already built in (plus lots of other useful features). You can easily disable the other features you don't use. That way you can trust the code is sound & won't accidently delete your passwd file.
     
Loading...

Share This Page