I am using samba 2.2.2 as PDC. We have developed some software which uses Postgresql as database server. Now I want samba to look username password etc from Postgresql or I want to keep copy of username,password in Postgres. I tried following but does not work. smb.conf _____________________________________________ passwd program = /scripts/pass %u unix password sync = Yes passwd chat = root*password* secret\n \ *new*password* %n\n *new*password* %n\n *NIS* %n\n *Done* _____________________________________________ Now /scripts/pass is _____________________________________________ yppasswd $1 read pass psql -h 172.16.0.13 -U postgres sync << EOF postgrepass delete from users where username='$1'; insert into users values('$1','$pass'); EOF echo Done _____________________________________________ How should I do this ? TIA Shekhar ___________________________________ V I I T, http://www.viitindia.org