#!/bin/sh ROOT_UID=0 # Only users with $UID 0 have root privileges. E_NOTROOT=67 # Non-root exit error. # Run as root, of course. if [ "$UID" -ne "$ROOT_UID" ]; then echo "Must be root to run this script." exit $E_NOTROOT fi # For each human user USER of the system, ensure that the user has no .netrc file. The command: # ls -l /home/USER/.netrc # should return the error “No such file or directory”. If any user has such a file, approach that user to discuss # removing this file. # The .netrc file is a configuration file used to make unattended logins to other systems via FTP. When this file # exists, it frequently contains unencrypted passwords which may be used to attack other systems. ls -l /home/*/.netrc 2>/dev/null | (cat <