Index: pykota/trunk/initscripts/postgresql/README.postgresql
===================================================================
--- pykota/trunk/initscripts/postgresql/README.postgresql (revision 2622)
+++ pykota/trunk/initscripts/postgresql/README.postgresql (revision 2817)
@@ -30,4 +30,7 @@
 and read the next one.
 
+        - edit the pykota-postgresql.sql file and modify the passwords on
+          the 'CREATE USER' lines.
+          
         - Launch the psql frontend and connect to the
           database template1 as a PostgreSQL administrator
@@ -36,21 +39,42 @@
           as user 'root' :
           
-            $ su - postgres
+            # su - postgres
             
           you're now user 'postgres', then continue with :   
           
-            $ psql -h localhost -U postgres template1
+            $ psql -h localhost -U postgres -f pykota-postgresql.sql template1
           
-        - Executes the pykota-postgresql.sql script :  
+        - If no error message appears, your PostgreSQL PyKota storage 
+          is now ready for use. NB : a lot of NOTICE messages might appear,
+          this is perfectly normal.
+          
+        - In ~pykota/pykota.conf, ensure that the following lines
+          are present and unique inside the [global] section :
         
-            template1=# \i pykota-postgresql.sql
+            storagebackend : pgstorage
+            storageserver : localhost
+            storagename : pykota
+            storageuser : pykotauser
+            storageuserpw : readonlypw
             
-        - Quit the psql frontend :    
+            NB : replace 'readonlypw' with the password you chose
+            for user 'pykotauser' when you modified pykota-postgresql.sql
+            
+        - In ~pykota/pykotadmin.conf ensure that the following lines
+          are present and unique inside the [global] section :
         
-            template1=# \q
+            storageadmin : pykotaadmin
+            storageadminpw : readwritepw
             
-        - Your PostgreSQL PyKota storage is now ready
-          for use.
+            NB : replace 'readwritepw' with the password you chose
+            for user 'pykotaadmin' when you modified pykota-postgresql.sql
         
+        - IMPORTANT : if your database is not located on the print server, 
+          replace 'localhost' in the lines above with your database server's 
+          hostname or IP address. If your database server doesn't listen on
+          its standard port, add the port number at the end of the hostname
+          with a colon to separate the hostname from the port.
+          See pykota/conf/pykota.conf.sample for examples.
+          
 ============================================================
 
@@ -70,5 +94,5 @@
   instead :
           
-            $ su - postgres
+            # su - postgres
             
   You're now user 'postgres', then continue the upgrade by following
Index: pykota/trunk/initscripts/postgresql/pykota-postgresql.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 2622)
+++ pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 2817)
@@ -35,7 +35,8 @@
 --
 -- Create the print quota database users
+-- NOTE: Change the password values to the passwords you would like.
 -- 
-CREATE USER pykotaadmin;
-CREATE USER pykotauser;
+CREATE USER pykotauser WITH UNENCRYPTED PASSWORD 'readonlypw' NOCREATEDB NOCREATEUSER;
+CREATE USER pykotaadmin WITH UNENCRYPTED PASSWORD 'readwritepw' NOCREATEDB NOCREATEUSER;
 
 -- 
Index: pykota/trunk/initscripts/mysql/README.mysql
===================================================================
--- pykota/trunk/initscripts/mysql/README.mysql (revision 2816)
+++ pykota/trunk/initscripts/mysql/README.mysql (revision 2817)
@@ -57,4 +57,11 @@
             NB : replace 'readwritepw' with the password you chose
             for user 'pykotaadmin' when you modified pykota-mysql.sql
+            
+        - IMPORTANT : if your database is not located on the print server, 
+          replace 'localhost' in the lines above with your database server's 
+          hostname or IP address. If your database server doesn't listen on
+          its standard port, add the port number at the end of the hostname
+          with a colon to separate the hostname from the port.
+          See pykota/conf/pykota.conf.sample for examples.
         
 ============================================================
Index: pykota/trunk/initscripts/mysql/pykota-mysql.sql
===================================================================
--- pykota/trunk/initscripts/mysql/pykota-mysql.sql (revision 2695)
+++ pykota/trunk/initscripts/mysql/pykota-mysql.sql (revision 2817)
@@ -35,5 +35,5 @@
 --
 -- Create the print quota database users
--- NOTE: Change the "IDENTIFIED BY" string to the password you would like.
+-- NOTE: Change the "IDENTIFIED BY" strings to the passwords you would like.
 -- 
 GRANT USAGE ON *.* TO 'pykotauser'@'localhost' IDENTIFIED BY 'readonlypw';
@@ -54,6 +54,6 @@
                    lifetimepaid FLOAT DEFAULT 0.0,
                    limitby VARCHAR(30) DEFAULT 'quota',
-		   description TEXT,
-		   overcharge FLOAT NOT NULL DEFAULT 1.0) TYPE=INNODB;
+                   description TEXT,
+                   overcharge FLOAT NOT NULL DEFAULT 1.0) TYPE=INNODB;
                    
 --
@@ -62,5 +62,5 @@
 CREATE TABLE groups (id INT4 PRIMARY KEY NOT NULL AUTO_INCREMENT,
                     groupname VARCHAR(255) UNIQUE NOT NULL,
-		    description TEXT,
+                    description TEXT,
                     limitby VARCHAR(30) DEFAULT 'quota') TYPE=INNODB;
                     
@@ -73,6 +73,6 @@
                       priceperpage FLOAT DEFAULT 0.0,
                       priceperjob FLOAT DEFAULT 0.0,
-		      passthrough ENUM('t','f') DEFAULT 'f',
-		      maxjobsize INT4) TYPE=INNODB;
+                      passthrough ENUM('t','f') DEFAULT 'f',
+                      maxjobsize INT4) TYPE=INNODB;
                     
 --
@@ -87,9 +87,9 @@
                         hardlimit INT4,
                         datelimit TIMESTAMP,
-			maxjobsize INT4,
+                        maxjobsize INT4,
                         warncount INT4 DEFAULT 0, 
-			FOREIGN KEY (userid) REFERENCES users(id),
-			FOREIGN KEY (printerid) REFERENCES printers(id)) 
-			TYPE=INNODB;
+                        FOREIGN KEY (userid) REFERENCES users(id),
+                        FOREIGN KEY (printerid) REFERENCES printers(id)) 
+                        TYPE=INNODB;
 CREATE INDEX userpquota_u_id_ix ON userpquota (userid);
 CREATE INDEX userpquota_p_id_ix ON userpquota (printerid);
@@ -113,12 +113,12 @@
                         options TEXT,
                         hostname VARCHAR(255),
-			md5sum TEXT,
-			pages TEXT,
-			billingcode TEXT,
-			precomputedjobsize INT4,
-			precomputedjobprice FLOAT,
+                        md5sum TEXT,
+                        pages TEXT,
+                        billingcode TEXT,
+                        precomputedjobsize INT4,
+                        precomputedjobprice FLOAT,
                         jobdate TIMESTAMP DEFAULT now(),
                         CONSTRAINT checkUserPQuota FOREIGN KEY (userid, printerid) REFERENCES userpquota (userid, printerid)
-			) TYPE=INNODB;
+                        ) TYPE=INNODB;
 CREATE INDEX jobhistory_u_id_ix ON jobhistory (userid);
 CREATE INDEX jobhistory_p_id_ix ON jobhistory (printerid);
@@ -134,9 +134,9 @@
                          softlimit INT4,
                          hardlimit INT4,
-			 maxjobsize INT4,
+                         maxjobsize INT4,
                          datelimit TIMESTAMP,
-			 FOREIGN KEY (groupid) REFERENCES groups(id),
-			 FOREIGN KEY (printerid) REFERENCES printers(id))
-			 TYPE=INNODB;
+                         FOREIGN KEY (groupid) REFERENCES groups(id),
+                         FOREIGN KEY (printerid) REFERENCES printers(id))
+                         TYPE=INNODB;
 CREATE INDEX grouppquota_g_id_ix ON grouppquota (groupid);
 CREATE INDEX grouppquota_p_id_ix ON grouppquota (printerid);
@@ -148,6 +148,6 @@
 CREATE TABLE groupsmembers(groupid INT4,
                            userid INT4,
-			   FOREIGN KEY (groupid) REFERENCES groups(id),
-			   FOREIGN KEY (userid) REFERENCES users(id),
+                           FOREIGN KEY (groupid) REFERENCES groups(id),
+                           FOREIGN KEY (userid) REFERENCES users(id),
                            PRIMARY KEY (groupid, userid)) TYPE=INNODB;
                            
@@ -157,6 +157,6 @@
 CREATE TABLE printergroupsmembers(groupid INT4,
                            printerid INT4,
-			   FOREIGN KEY (groupid) REFERENCES groups(id),
-			   FOREIGN KEY (printerid) REFERENCES printers(id),
+                           FOREIGN KEY (groupid) REFERENCES groups(id),
+                           FOREIGN KEY (printerid) REFERENCES printers(id),
                            PRIMARY KEY (groupid, printerid)) TYPE=INNODB;
 --
@@ -166,7 +166,7 @@
                        userid INT4,
                        amount FLOAT,
-		       description TEXT,
+                       description TEXT,
                        date TIMESTAMP DEFAULT now(),
-		       FOREIGN KEY (userid) REFERENCES users(id)) TYPE=INNODB;
+                       FOREIGN KEY (userid) REFERENCES users(id)) TYPE=INNODB;
 CREATE INDEX payments_date_ix ON payments (date);
 
@@ -175,10 +175,10 @@
 --
 CREATE TABLE coefficients (id INT4 PRIMARY KEY NOT NULL AUTO_INCREMENT,
-			   printerid INT4 NOT NULL,
-			   label VARCHAR(255) NOT NULL,
-			   coefficient FLOAT DEFAULT 1.0,
-			   FOREIGN KEY (printerid) REFERENCES printers(id),
-			   CONSTRAINT coeffconstraint UNIQUE (printerid, label)
-			   ) TYPE=INNODB;
+                           printerid INT4 NOT NULL,
+                           label VARCHAR(255) NOT NULL,
+                           coefficient FLOAT DEFAULT 1.0,
+                           FOREIGN KEY (printerid) REFERENCES printers(id),
+                           CONSTRAINT coeffconstraint UNIQUE (printerid, label)
+                           ) TYPE=INNODB;
 
 -- 
