Samba and PostgreSQL

Please note: This is a very short howto, so dont expect any detailed explanations.

Samba can use PostgreSQL as a backend for storing user specific data such as login name, password, login script, home dir etc. This is possibly what you want if you are running Samba as PDC in a Windows NT/2000 domain environment because it is more convienient to have a sql database than flat files for this.

Installation steps:

If anything goes wrong, then turn on logging for Samba and PostgreSQL. The psql and the pdbedit tools are your friends.

You might encounter situations where a workstation's hostname is stored in lowercase characters in the database while the workstation sends an uppercased string to authenticate itself. Maybe this is a bug in the pgsql backend. You can manually fix it by doing a sql command like UPDATE my_samba_table SET username='HOSTNAME$' WHERE username='hostname$'; with psql.