Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Pochu
  • Order by date
  1. Pochu

    Setting Variable to Oldest File in the Directory

    var1=`ls -tr |head -1`
  2. Pochu

    Script to find user having sudo access to root

    In this case you should be a root or member of root group.
  3. Pochu

    Script to find user having sudo access to root

    As i stated previously, you don't need to do anything. Just execute the script by any user. This script logically grep and awk's the sudoers file and shows the expected result.
  4. Pochu

    Script to find user having sudo access to root

    I wrote it while SOX auditing.
  5. Pochu

    Script to find user having sudo access to root

    It is so simple to execute it from anywhere on any linux system. But anyway i like your Suggestion. I will do it next time. For above script you can simply execute it . (./... )
  6. Pochu

    Script to find user having sudo access to root

    #!/bin/bash count=$(cat /etc/sudoers | grep "ALL" | grep -v ^# | wc -l) echo "The following users have sudo access to root" for i in $(seq 1 $count) do line=$(cat /etc/sudoers | grep "ALL" | grep -v ^# | head -n $i | tail -n 1 | tr "=()" " ") cnt=$(echo $line | sed -e 's/[^ALL]/...

Part and Inventory Search

Back
Top