Operating System - HP-UX
1821051 Members
2788 Online
109631 Solutions
New Discussion юеВ

DBM authentication for apache 2.0

 
Charlie Jernigan
New Member

DBM authentication for apache 2.0

We are creating a new apache server for Lawson on a test machine. I am using DBM authentication. The DBM file was created with the apache utility dbmmanage and can see the accounts and encrypted passwords.

Problem: Only some users can authenticate. Others get the error:
DBM User not found

Any ideas?
2 REPLIES 2
Robert-Jan Goossens
Honored Contributor

Re: DBM authentication for apache 2.0

Hi,
---
Creating A DBM Users File
For standard (htpasswd) user authentication password files, the program htpasswd is used to add new users and set their passwords. To create and manage DBM format user files another program from the Apache support directory is used. The program is called dbmmanage and is written in perl (so you will need perl on your system, and it will need to have been compiled with support for the same DBM library you compiled into Apache. If you have only just installed DBM on your system you will might need to re-compile perl to build in DBM support).

This program can be used to create a new DBM file, add users and passwords to it, change passwords, or delete users. To start by creating a new DBM file and adding a user to it, run the command:
dbmmanage /usr/local/etc/httpd/usersdbm adduser martin hamster

The creates the DBM file /usr/local/etc/httpd/usersdbm (which might actually consist of /usr/local/etc/httpd/usersdbm.dir and /usr/local/etc/httpd/usersdbm.pag), if it does not already exist. It then adds the user 'martin' with password 'hamster'. This command can be used with other usernames and passwords to add more users, or with an existing username to change that user's password. A user can be deleted from the password file with
dbmmanage /usr/local/etc/httpd/usersdbm delete martin

You can get a list of all the users in the DBM file with
dbmmanage /usr/local/etc/httpd/usersdbm view
---
http://www.apacheweek.com/features/dbmauth

Regards,
Robert-Jan
Charlie Jernigan
New Member

Re: DBM authentication for apache 2.0

Robert-Jan,

That appears to be working. I can add users, upgrade passwords, delete users, and view the whole list. And it is integrated into apache 2.0 where some people can authenticate and others who are in the list get the error "DBM User XXXX can not be found". Very strange.