Protected Directories | Adding Users

Discussion in 'General' started by pebkac, Jun 17, 2009.

  1. pebkac

    pebkac Member HowtoForge Supporter

    Hey all,

    I have to add about 200+ users to a protected directory and really dont want to do it one by one. Is there a file I could add the usernames and passwords to?


    --Steve
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Just add them to the .htpasswd file in the root directory of the website.
     
  3. pebkac

    pebkac Member HowtoForge Supporter

    what is the format they go in?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Use the htpasswd command to insert them.
     
  5. pebkac

    pebkac Member HowtoForge Supporter

    thanks til, however I cant seem to figure it out. I just read the man pages and some tutorials about htpasswd and I cant see how to take a list in this format:

    user.name:password

    And have htpasswd encrypt the passwords and move them to the .htpasswd file for this site. I see you can add a user to it or create a users file but then I would have to do it one by one and Might as well do it through ISPConfig.

    Any additional help would be greatly appreciated.

    --Steve
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no import function for lists, this is the command to add users in the correct format and with the correct password encryption into the file. You will have to write a script that uses your list with usernames and cleartext passords and then executes the command for every user to add it to the file.
     

Share This Page