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:
passdb backend = pgsql:my_pgsql my_pgsql:pgsql user = my_samba_user my_pgsql:pgsql password = my_samba_password my_pgsql:pgsql database = <name of your database cluster> my_pgsql:table = my_samba_table
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.