X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 99FB99F9F7E for ; Fri, 15 Sep 2006 01:55:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 78805-08 for ; Fri, 15 Sep 2006 04:55:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 44BD49F9F2F for ; Fri, 15 Sep 2006 01:31:28 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id k8F4VOhi065484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Sep 2006 22:31:27 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id k8F4VNBP001993; Thu, 14 Sep 2006 22:31:23 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id k8F4VNdL001992; Thu, 14 Sep 2006 22:31:23 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 14 Sep 2006 22:31:23 -0600 From: Michael Fuhr To: david.lao@sharpasia.com.mo Cc: Tom Lane , pgsql-admin@postgresql.org Subject: Re: real and effective user ids must match Message-ID: <20060915043123.GA1845@winnie.fuhr.org> References: <27572.1158238113@sss.pgh.pa.us> <50291.202.86.139.20.1158246823.mailsage.folio@sharpasia.com.mo> <20060915004924.GA32408@winnie.fuhr.org> <1143.202.175.123.162.1158283228.mailsage.folio@sharpasia.com.mo> <20060915014146.GA32900@winnie.fuhr.org> <1479.202.175.123.162.1158284982.mailsage.folio@sharpasia.com.mo> <20060915025331.GA1109@winnie.fuhr.org> <2411.202.175.123.162.1158289986.mailsage.folio@sharpasia.com.mo> <20060915033750.GA1374@winnie.fuhr.org> <3005.202.175.123.162.1158292578.mailsage.folio@sharpasia.com.mo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3005.202.175.123.162.1158292578.mailsage.folio@sharpasia.com.mo> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.817 tagged_above=0 required=5 tests=SPF_HELO_SOFTFAIL, SPF_SOFTFAIL, UNPARSEABLE_RELAY X-Spam-Level: *** X-Archive-Number: 200609/143 X-Sequence-Number: 23057 On Fri, Sep 15, 2006 at 11:56:18AM +0800, david.lao@sharpasia.com.mo wrote: > su -l postgres -s /bin/sh -c id output: > uid=0(root) gid=26 euid=26(postgres) groups=26 I don't have a Linux box to test but that output isn't what I'd expect, and it's not what I get with the equivalent commands on Solaris and FreeBSD. The above output shows that the real uid and effective uid are different, which is what the postmaster is complaining about. I'd expect them to be the same: both postgres. Can anybody else with a Linux box test the above command? Do you have sudo? If so then what does "sudo -u postgres id" show? If uid and euid are the same (both postgres) then you might be able to start the postmaster with sudo instead of su. > >When was the last time you successfully started the postmaster the > >same way you're trying now? How long had you been running PostgreSQL > >without any problems? If it used to work then something has changed. > > I am running Redhat 8, it is same way to start the postgres > "/etc/rc.d/init.d/postgresql start", I running postgre about > 2 years ago, maybe it is the hacker do it, because before I > found one unknown user and delect it, and then I restart the > service with error. What do you mean by "the hacker"? Do you know or suspect that you've been hacked? If so then I'd recommend that you reinstall your system from trustworthy media, make sure you have current security patches, and close any configuration holes that might have let an intruder in. -- Michael Fuhr