input file to htpasswd
I have a list of users and passwords that I would like to input to htpasswd but keep getting errors. I have tried a couple of different scripts and get the following;
: bad interpreter: No such file or directory this is the current script; #!/bin/bash for line in `cat users.asc` do name=`echo $line | cut -f 1 -d ';'` password=`echo $line | cut -f 2 -d ';'` htpasswd -b .htpasswd $name $password done Any suggestions of what I am doing wrong? Thanks |
Did you make the script executable?
chmod +x <filename> Also might want to place the full path to the file users.asc in your script just in case the script isn't in the same directory as the file itself.. etc. |
Thanks for the suggestion but yes, it is executable and I added the full path name of both files but still get the same error.
|
Where are you placing this script at? Is it in your current path? Or have you tried typing it like ./<scriptname>
Cause the error your recieving clearly states its not running the script as it states, no such file or directory. |
It's in the same directory as the 2 files - /home. I am trying to execute it from that directory using ./script
|
All times are GMT -5. The time now is 07:57 PM. |