Обсуждение: step 2..
I got postgres installed and working. I created some users and a database. but I don't see where I set the passwords or know the passwords for these users. Or user postgres for that matter.
Tom Allison wrote: > I got postgres installed and working. > I created some users and a database. > > but I don't see where I set the passwords or know the passwords for > these users. Or user postgres for that matter. template1=# ALTER USER foobar ENCRYPTED PASSWORD 'xxxxxxxx' ; You have to specify the cleartext password (but it will be stored encrypted by PostgreSQL). It's an SQL string, so be sure to enclose it in single quotes. For details, see: http://www.postgresql.org/docs/7.4/static/sql-alteruser.html Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. PI: int f[9814],b,c=9814,g,i;long a=1e4,d,e,h; main(){for(;b=c,c-=14;i=printf("%04d",e+d/a),e=d%a) while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d%g;}
Tom Allison wrote: > psql: FATAL: IDENT authentication failed for user "foo" > > pg_hba.conf? > > I have entries like: > > local all postgres ident sameuser > local all all ident sameuser > host all all 127.0.0.1 255.255.255.255 ident sameuser > host all all 0.0.0.0 0.0.0.0 reject Mine looks like this: #TYPE DBASE USER IP-ADDRESS IP-MASK METHOD #---- ----- ---- ---------- ------- ------ local all all trust host all all 127.0.0.1 255.255.255.255 trust host fishdb simon 192.168.130.0 255.255.255.0 md5 host treedb janet 192.168.130.0 255.255.255.0 md5 host tigerdb marion 192.168.130.0 255.255.255.0 md5 ... etc. > I have the exact same user and password set in my login user files as > what I created using the sql script above. What do you mean by "login user files"? Database user are not the same as login users. In fact, they _should_ not be the same. > I'm still getting the IDENT error. > suggestions? Not using "ident" authentication? It's insecure anyway. Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Python tricks" is a tough one, cuz the language is so clean. E.g., C makes an art of confusing pointers with arrays and strings, which leads to lotsa neat pointer tricks; APL mistakes everything for an array, leading to neat one-liners; and Perl confuses everything period, making each line a joyous adventure <wink>. -- Tim Peters
On Wed, Mar 17, 2004 at 12:42:14 +0100, Oliver Fromme <olli@lurza.secnetix.de> wrote: > > Not using "ident" authentication? It's insecure anyway. This depends on the context. For domain socket connections on supported OS's it is secure and is one of the best ways to do authentication. For internet connections, you need to be able to trust the connecting host and the network over which packets travel. In a lot of situations you may not have enough trust and/or need to justify using ident, but in some situations it can be used.