Here are some scripts that I wrote to mount and search bulk windows machines.
mountmachines.sh
#!/bin/bash
cd /searchmachines
echo “Username please”
read username
echo “Password please”
read -s password
for machine in `cat machinelist.txt`
do
mkdir remote$machine
echo “Attempting to mount $machine…”
mount.cifs //$machine/c$ ./remote$machine -o username=$username,password=$password
done
exit
This next script searches the machines for NTUSER.DAT files to find users that were logged in during a specific time frame.
search.sh
#!/bin/bash
cd [...]
So you just kicked your roommate out and you need to change the username and password on 250 switches.
You can do it with a quick bash loop and pipe it into telnet. (ssh is way better, but isn’t enabled by default on most network devices)
Make a new file named credentials.txt and put the username on [...]