forked from arpankapoor/forti_login
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bash script to find users who have not changed their passwords
- Loading branch information
Guest
authored and
Guest
committed
Nov 7, 2015
1 parent
b951742
commit bdcbe53
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
#!/bin/bash | ||
touch nochange.list | ||
echo "create" | ||
for i in `cat roll.list` | ||
do | ||
bash forti_login ${i} ${i} | grep "Logged in." | ||
echo "start" | ||
echo ${i} | ||
bash forti_login ${i} "nitc1234" | grep "Logged in." | ||
if [ $? -eq 0 ]; then | ||
echo "s" | ||
echo ${i} >> nochange.list | ||
else | ||
echo "trying roll number ${i}" | ||
echo "f" | ||
fi | ||
echo "next" | ||
done | ||
echo "end" |