Обсуждение: alter user to change user's password returns pg_shadow: Permission denied.
According to the Postgresql manual, a user can alter their own password. When I try: alter user "test" with password "zzzz"; Where test is the user id signed in with, I get the error: ERROR: pg_shadow: Permission denied. What am I overlooking? Tia,
Wayne Johnson <wdtj@yahoo.com> writes: > According to the Postgresql manual, a user can alter their own > password. When I try: > alter user "test" with password "zzzz"; > Where test is the user id signed in with, I get the error: > ERROR: pg_shadow: Permission denied. Works for me. What version are you running? BTW, any reasonably recent version of PG will object to that style of quoting --- the password in ALTER USER is a string literal, not an identifier, so it needs single quotes not double quotes. regards, tom lane
OK, so apparently the solution is to upgrade. My OS is currently RedHat 6.2. I'm a little leary of upgrading Linux at this point. Is there a way to run Postgresql 7 under RedHat 6.2 or do I have to upgrade? Wayne Johnson wrote: > > According to the Postgresql manual, a user can alter their own > password. When I try: > alter user "test" with password "zzzz"; > Where test is the user id signed in with, I get the error: > ERROR: pg_shadow: Permission denied. > > What am I overlooking? > > Tia, > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
> OK, so apparently the solution is to upgrade. My OS is currently RedHat > 6.2. I'm a little leary of upgrading Linux at this point. Is there a > way to run Postgresql 7 under RedHat 6.2 or do I have to upgrade? Currently running PostgreSQL under RedHat 6.0 over here. Works like a treat (thanks, guys!). Did you get a source or RPM install? Either one is painless, apart from a full backup, initdb, reload cycle (even that's not too bad). There are full docs for this on the site, just haven't got the url atm. Just make sure you do an upgrade in the form it was installed. If you got the RPM originally, upgrade via RPM (but *get the dump first!*). Ditto for source. Mixing and matching source vs. RPM upgrades under RedHat is *such* a pain in the backside... Cheers Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 jasont@indigoindustrial.co.nz