0
2
The Scenario is like I have a list of root passwords. But i don't want to keep trying Manually. So i wrote the shell script :
for i in {1..26}
do
su - >>result
done
and all my password are on a file "attempt.txt".
Now on Command Prompt i type the Command :
bash p2.sh < attempt.txt
But It shows errors : "Standard in must be a tty"
So is there some way I can enter these passwords through some codes or commands without manually typing each Of those? Please tell a command-line approach instead of some advanced utility software. I'm in it for learning. Thanks :)
No definately it's not a good idea. But In my College Campus Lab there are computers with different passwords, and we are told not to change them. Well since there are 12-14 different password, I dont want to try manually one after the other. So I want that I can test the working one using a script. Ideally they should not keep a password or just give us a list of computer no. and its respective password, but they don't. – Dhruv Chandhok – 2014-04-09T20:40:14.417
Hope this works, I will test it during my lab tomorrow :) – Dhruv Chandhok – 2014-04-09T20:41:27.680
Wasn't able totry it today, But I feel It will work. Thanks :) – Dhruv Chandhok – 2014-04-10T08:00:42.520