Rather your public or private industry at some point your system will be audited. As part of this audit there may include a search for old versions of Java that have not been patched. Even though you may patch your OS consistently often COTS software such at Symantec NetBackup, Oracle and so on will install…
Script to Find World Writable Files
Notes Script works on all Linux operating systems In the middle of the while loop you can add something like chmod o-w ${file} to remove the world writable flag
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#!/bin/bash ########################################################### # Purpose: Searches mounted filesystems for files that are # world writable ########################################################### # Ignores filesystem types that should not be scanned for fs in $(mount -v | egrep -v "nfs|oracle|tmpfs|lofs|ctfs|objfs|fd|devfs|mntfs|sharefs|odm|proc|devpts|sysfs" | awk '{print $3}'); do find ${fs} -xdev -type f -perm -o+w -name "*" -print0 | while IFS= read -r -d '' file; do ls -l "${file}" done done |
Shell Script for Backing Up All Ownership and Permissions
Purpose There will come a day where someone will accidentally run an chmod or chown on / or some other directory and change all ownership and/or permissions on all files under that directory. Having this script run periodically will save you ass. Notes The script already excludes the basic filesystems you wouldn’t want to scan…
Tarsnap Backup Shell Script
This is a Tarsnap backup script that allows the user to fill in all include, exclude and backup options and the script will generate and run the tarsnap command. The script also generates a backup log which will be emailed to the specified recipients. Requirements Tarsnap account For email to function some type of MTA…
-
Recent Posts
Categories
- Audit
- Backups
- Clustering
- Development
- FreeBSD
- FreeIPA
- GlusterFS
- Guru Labs
- IPV6
- Katello
- Linux
- Linux
- Linux
- Logical Volume Manager
- mysql
- Networking
- Pacemaker
- Performance Monitoring
- Red Hat Enterprise Linux
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Satellite Server 6
- Red Hat Summit
- Security
- Shell Scripting
- Solaris
- Storage Management
- Training
- Troubleshooting
- Uncategorized
- VAS/QAS Administration
- VERITAS Cluster Server
- VERITAS InfoScale
- VERITAS NetBackup
Tags
agent backup centos 6 cluster clusvcadm cman df fence fencing filesystem find fstype gl236 glusterfs guru labs hammer-cli hardening HP ILO infoscale oracle ownership pacemaker pcp pcs permissions pmcd QAS red hat 6 resource resources rgmanager rhel rhel 6 rhel 7 scripting security ssh storage sync-plan tarsnap training VAS vcs veritas