Bash script to reset admin password with chntpw
I'm trying to write a script that will automatically reset or blank a windows admin password.
The idea is to use chntpw point it at a SAM file and run
chntpw -l SAM
to list users, grep the admin or Administrator account and automaticly append an "*" to reset the password.
However, I dont think its possible to redirect an input into chntpw as
the command requires several y and n input responses, not just a single input.
Is there any way to pass multiple inputs into the chntpw command? Thanks in advance.
|