Security
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs Security

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old February 15th, 2008, 10:49 AM
nobody
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Password testing script: help pls

For any Unix server with FTP, I have written a short script that can
check if a user's password is the same as their login ID. But it's
impractical and difficult with sftp.

My current script:


#!/bin/ksh

FTP (){
ftp -in <<EF
open $(hostname)
user $USER $USER
quit
EF
}

USERS=$(cat /etc/shadow | cut -d\: -f1)
for USER in $USERS
do
echo "Testing ${USER}"
MESSAGES=""
MESSAGES=$(FTP $USER | grep failed )
if [[ -z $MESSAGES ]];then
echo " User \"$USER\": login and password the same. "
echo " User \"$USER\": login and password the same. " >>
test_pw.log
fi
done



Can anyone think of a means of scripting such a thing for a server
with FTP ripped out? It would go through every user in the shadow
file, and try to log in using the user ID as the password, and report
on anyone using such a weak password

Doing this with 6 or 10 users is easy manually of course, but many of
my servers have literally hundreds of users

Thnx in advance.

Reply With Quote
Reply

Viewing: Web Development Archives FAQs Security > Password testing script: help pls


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway