Обсуждение: ALTER USER does not work
postgresql 7.3.1 - cannot change user either from command line psql or from Webmin. I just migrated a database from 7.2 to 7.3 . On the 7.2 box, the user had a password and the website functioned fine. On the 7.3 box, the wesite does not log on properly and I suspect it is because the database is not being correctly accessed. I am unable to change the username on the 7.3 box to have a password. I seem to be able to delete the user but not set it with a password or with NOCREATEDB or NOCREATEUSER. Is there a setting in postgresql.conf or pg_hba.conf that need to be changed? Do the access priviledges need to be change from trust to password? (The machine is only on the local LAN, so security is not an issue for now. I'm a little lost. Thanks for any help. PJ
PJ, > postgresql 7.3.1 - cannot change user either from command line psql > or from Webmin. > I just migrated a database from 7.2 to 7.3 . On the 7.2 box, the > user had a password and the website functioned fine. On the 7.3 box, > the wesite does not log on properly and I suspect it is because the > database is not being correctly accessed. I am unable to change the > username on the 7.3 box to have a password. I seem to be able to > delete the user but not set it with a password or with NOCREATEDB or > NOCREATEUSER. > Is there a setting in postgresql.conf or pg_hba.conf that need to be > changed? Do the access priviledges need to be change from trust to > password? (The machine is only on the local LAN, so security is not > an issue for now. > I'm a little lost. > Thanks for any help. can you post the exact text of your ALTER USER command, and the error message that you get? -Josh
At 02:23 PM 1/10/2003 -0800, you wrote: >PJ, > > > postgresql 7.3.1 - cannot change user either from command line psql > > or from Webmin. > > I just migrated a database from 7.2 to 7.3 . On the 7.2 box, the > > user had a password and the website functioned fine. On the 7.3 box, > > the wesite does not log on properly and I suspect it is because the > > database is not being correctly accessed. I am unable to change the > > username on the 7.3 box to have a password. I seem to be able to > > delete the user but not set it with a password or with NOCREATEDB or > > NOCREATEUSER. > > Is there a setting in postgresql.conf or pg_hba.conf that need to be > > changed? Do the access priviledges need to be change from trust to > > password? (The machine is only on the local LAN, so security is not > > an issue for now. > > I'm a little lost. > > Thanks for any help. > >can you post the exact text of your ALTER USER command, and the error >message that you get? su pgsql psql database ALTER USER username WITH PASSWORD password NOCREATEDB NOCREATEUSER There is no error message. I do restart posgresql and then check on Webmin. It always shows the same configuration for the username: Requires password? No; Can create databases? No; Can create users? No; Valid until Forever. I can delete the username and when I create a new one with same name but with new password, the result is the same. :(( Thanks in advance... PJ
At 05:42 PM 1/10/2003 -0500, you wrote: >At 02:23 PM 1/10/2003 -0800, you wrote: >>PJ, >> >> > postgresql 7.3.1 - cannot change user either from command line psql >> > or from Webmin. >> > I just migrated a database from 7.2 to 7.3 . On the 7.2 box, the >> > user had a password and the website functioned fine. On the 7.3 box, >> > the wesite does not log on properly and I suspect it is because the >> > database is not being correctly accessed. I am unable to change the >> > username on the 7.3 box to have a password. I seem to be able to >> > delete the user but not set it with a password or with NOCREATEDB or >> > NOCREATEUSER. >> > Is there a setting in postgresql.conf or pg_hba.conf that need to be >> > changed? Do the access priviledges need to be change from trust to >> > password? (The machine is only on the local LAN, so security is not >> > an issue for now. >> > I'm a little lost. >> > Thanks for any help. >> >>can you post the exact text of your ALTER USER command, and the error >>message that you get? > >su pgsql >psql database >ALTER USER username WITH PASSWORD password NOCREATEDB NOCREATEUSER > >There is no error message. >I do restart posgresql and then check on Webmin. It always shows the same >configuration for the username: Requires password? No; Can create >databases? No; Can create users? No; Valid until Forever. >I can delete the username and when I create a new one with same name but >with new password, the result is the same. :(( CORRECTION!!! (I forgot to finish the command with the semicolon ";" and I did not enter the password with single quotes) However, I just tried again: # su pgsql $ psql template1 template1=# ALTER USER username WITH PASSWORD 'password' NOCREATEDB NOCREATEUSER; ALTER USER template1=# Webmin, still does no register the change. PJ
PJ., > >su pgsql > >psql database > >ALTER USER username WITH PASSWORD password NOCREATEDB NOCREATEUSER > > > >There is no error message. > >I do restart posgresql and then check on Webmin. It always shows the > same configuration for the username: Requires password? No; Can > create databases? No; Can create users? No; Valid until Forever. > >I can delete the username and when I create a new one with same name > but with new password, the result is the same. :(( > CORRECTION!!! (I forgot to finish the command with the semicolon ";" > and I did not enter the password with single quotes) > However, I just tried again: Sounds like your problem is with pg_hba.conf, not ALTER USER. Wanna post the non-commented portions of your pg_hba.conf file? -Josh