1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

script for search SUID/GUID !

Discussion in 'Linux and Unix' started by jackjill, Feb 1, 2005.

Thread Status:
Not open for further replies.
  1. jackjill

    jackjill Thread Starter

    Joined:
    Nov 26, 2004
    Messages:
    11
    Hi guys,
    i'm trying to write a script for following purpose.

    shell program will be used by Linux/Unix sysadmins to search for
    SUID/SGID files. The default directory to search is the present
    working directory, however, the user may include a directory name on
    the command line as an alternative. Also, if the user includes the
    argument '-R' then the search should include all subdirectories
    recursively. Also, the '-G' argument will include SGID files which by
    default are not shown. The output of the script should show the
    absolute pathname of the file and the owner.


    Please help me in performin such task.

    i'm trying using this line:

    ls -l | awk '{print $1}' | grep s
    it just prints the permissions having s bit.
     
  2. pterygiod

    pterygiod

    Joined:
    Jan 22, 2005
    Messages:
    35
    http://www.phunnypharm.org/pub/sxid/

    This tool will do all you want and more!

    Install - readme

    configure six.conf

    seach directory /

    i suggest you set it up as a cron job

    Cheers
     
  3. Ddruid

    Ddruid

    Joined:
    Jan 25, 2004
    Messages:
    74
    Code:
    find / -type f \( -perm -04000 -o -perm -02000 \) -exec ls -ld {} \;
    Find can do all you need.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - script search SUID
  1. Damonc
    Replies:
    2
    Views:
    173
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/325550

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice