Here are some scripts that I wrote to mount and search bulk windows machines.
echo “Username please”
echo “Password please”
read -s password
for machine in `cat machinelist.txt`
echo “Attempting to mount $machine…”
mount.cifs //$machine/c$ ./remote$machine -o username=$username,password=$password
This next script searches the machines for NTUSER.DAT files to find users that were logged in during a specific time frame.
echo “Enter number of days for oldest file. (4 for no older than 4 days)”
echo “Enter number of days for newest file. (2 for at least 2 days old)”
find ./ -name NTUSER.DAT -mtime $new -mtime -$old -daystart