Reputation: 2617
I'm trying to place an entire directory behind Apache Authentication on an IBMi AS/400 V7R2. I need to specify credentials which have no relationship with the AS/400 other than the fact they are defined in a file on the IFS. I'm new to the IBMi world and am unsure where Apache was installed. I know I need to include a handful of Apache modules, but don't know where those are. I also do not know where I can find the htpasswd.exe
equivalent so I was going to be hopeful and use http://www.htaccesstools.com/htpasswd-generator-windows/. The file which contains the credentials must have the password encrypted as well. I've tried various strings in a which
command in PASE with no luck.
I've also seen two different ways to include the password file (PasswdFile
and AuthUserFile
) but can't find the difference. My assumption is that PasswdFile
is used for actual IBMi system users and AuthUserFile
is meant to be used with a .htpasswd.exe
generated file for arbitrary users.
Code Examples I've tried:
<Directory "/path/to/secure/directory">
PasswdFile /path/to/.htpasswd
AuthType Basic
AuthName "To access the requested page, please enter your login credentials."
AllowOverride AuthConfig Options
Options Indexes
Require valid-user
</Directory>
OR
<Directory "/path/to/secure/directory">
AuthType Basic
AuthName "Secure Login"
AuthUserFile /path/to/.htpasswd
Require valid-user
</Directory>
The modules I was going to include to cover all of my bases until it was working include:
Has anyone done this before, or knows how to do this on IBMi and can lend some guidance? Most articles specific to Apache for IBMi usually explain how to authenticate against existing IBMi users and then everything for .htpasswd
base authentication is not specific to IBMi, so I don't know if Apache for IBMi is different in this case or if I'm doing something wrong.
Upvotes: 3
Views: 679
Reputation: 607
Hope this works.
I would say you're stuck using either the system user ids and password or validation lists. check out this link: http://www-01.ibm.com/software/webservers/httpservers/doc/v4r4/wmg/RZAG2M07.HTM#HDRPASSWDF
Upvotes: 2