Hashing multiple user:password combinations (sha)
Hi Everybody,
I just received a spreadsheet containing quite a few user names and (unhashed) passwords. I need to salt these combinations, preferably with SHA. How would I approach such a task, given that I can't script? What I wanna do with it: I need to add those salted combinations (user:hashedpw) to a .htgroup file on a web server. Can anyone help me out? Point me to a script or anything? I really need some help. Thanks a billion. Jean-Luc |
If you are using apache you should use htpasswd.
If the spread sheet is just a .csv (comma separated value) file it could be as simple as Code:
tr '\n' , < users.csv | xargs -n2 -d, htpasswd -b -s .htgroup |
Hi,
thank you for that tip. Just tried it. Converted the contents of the spreadsheet to a csv list containing the "user,password" combinations. Each in it's own line. The spreadsheet is located in my home directory. If I try your code, I get the following: Quote:
Thank you very much so far for your help. Jean-Luc. |
OK, I'm a few steps further. I had to install htpasswd first. Did that. I also had to add -c to create the htgroup file.
Code:
~$ tr '\n' , < users.csv | xargs -n2 -d, htpasswd -b -s -c .htgroup Code:
... |
Quote:
Quote:
Code:
touch .htgroup |
I must use my brain more. :)
I was able to get my task done. Thank you very much for all your help. I really appreciate what you've done. |
All times are GMT -5. The time now is 06:41 AM. |