Results 1 to 2 of 2

Thread: Probs in a script called from another script

Hybrid View

  1. #1
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630

    Probs in a script called from another script

    Helpeth me please.

    Here's what I'm trying to do.

    Code:
    #!/bin/bash
    #
    # This runs a daily check for suspicious activity using chkrootkit
    #
    SUBJ="Root Scan For $HOSTNAME on `date`"
    /opt/chkrootkit-0.43/chkrootkit | mail -s "$SUBJ" user@address
    It works, but chkrootkit can't exec things that it otherwise can when run directly (as in cd chkrootkit-0.43; ./chkrootkit | mail -s blah blah blah).

    Code:
    .
    .
    .
    Checking `sniffer'... not tested: can't exec ./ifpromisc
    Checking `w55808'... not infected
    Checking `wted'... not tested: can't exec ./chkwtmp
    Checking `scalper'... not infected
    Checking `slapper'... not infected
    Checking `z2'... not tested: can't exec ./chklastlog
    Both scripts are owned by root and the entire chkrootkit dir is owned by root.

    Am I calling chkrootkit the wrong way? Is it maybe that chkrootkit is a sh script and not bash? ???

    Oh, and I'm launching this script as root.


  2. #2
    Advisor Outlaw's Avatar
    Join Date
    May 2001
    Location
    Clifton Park, NY
    Posts
    630

    Re:Probs in a script called from another script

    Nevermind.

    Code:
    #
    cd /opt/chkrootkit-0.43
    SUBJ="Root Scan For $HOSTNAME on `date`"
    ./chkrootkit | mail -s "$SUBJ" user@address
    Works better

Similar Threads

  1. SSH and bash script
    By vwgtiturbo in forum Programming
    Replies: 7
    Last Post: 12-25-2008, 04:40 AM
  2. Running cusom firewall script -iptables -RHEL 4
    By sud.tech in forum Programming
    Replies: 0
    Last Post: 06-12-2008, 01:09 PM
  3. Firewall script in RHEL 4
    By sud.tech in forum Programming
    Replies: 8
    Last Post: 06-12-2008, 01:07 PM
  4. Rsync incremental backup script
    By vwgtiturbo in forum Programming
    Replies: 6
    Last Post: 06-07-2006, 08:19 PM
  5. Shell Script to modify apachectl
    By gaxprels in forum Programming
    Replies: 6
    Last Post: 07-23-2002, 07:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •