|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
![]() |
| Viewing: Web Development Archives > FAQs > Security > Password testing script: help pls |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|