Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 98406

Summary: After update of sys-libs/pam and sys-apps/shadow postgresql complians on startup/shutdown
Product: Gentoo Linux Reporter: Stuart W. Finlayson <stu>
Component: Current packagesAssignee: PgSQL Bugs <pgsql-bugs>
Status: VERIFIED FIXED    
Severity: minor CC: esigra, k.epost, Werner.Peter
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 99596    
Bug Blocks:    

Description Stuart W. Finlayson 2005-07-08 15:12:45 UTC
I recently updated sys-libs/pam and sys-apps/shadow.  This happened following the update:

storm ~ # /etc/init.d/postgresql start
 * Starting PostgreSQL ...
su: Authentication service cannot retrieve authentication info.
(Ignored)                                                                                                                           [ ok ]
storm ~ # /etc/init.d/postgresql stop
 * Stopping PostgreSQL ...
su: Authentication service cannot retrieve authentication info.
(Ignored)
postmaster stopped                                                                                                                  [ ok ]
storm ~ #

It still starts up, but complains in the process.  Adding postgres into /etc/shadow fixes the problem.  So, could someone add this to whichever package it needs to be added to?

Here's the customary `emerge --info` as well:
storm ~ # emerge --info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.12-gentoo-r4 i686)
=================================================================
System uname: 2.6.12-gentoo-r4 i686 AMD Athlon(TM) MP 1900+
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Apr 28 2005, 18:02:48)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-mp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-mp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 3dnow X alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts bootsplash bzlib cdr crypt curl curlwrappers emboss encode fam flac foomaticdb fortran gd gdbm gif gpm gtk imagemagick imlib ipv6 jpeg kde kdeenablefinal libg++ libwww mad mikmod mime mmx motif mp3 mpeg ncurses nptl ogg oggvorbis opengl oss pam pdflib perl png postgres procmail python qt quicktime readline rtc sdl slang smime spell sse ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts vorbis xine xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Jason Huebel (RETIRED) gentoo-dev 2005-07-15 12:27:36 UTC
I'm experiencing the same problem when trying to run a php script from crontab  
as the apache user. So this is a larger problem. 
  
su: Authentication service cannot retrieve authentication info. 
Comment 2 Oldrich Jedlicka 2005-07-24 08:48:24 UTC
Problem is in /etc/shadow file. For example postgres user is not included in
this file, I cannot say if it was in this file before (but I think it was).

Now when you add line

  postgres:*:::::::

into /etc/shadow, warning should disappear. Please try it, if it solves the problem.

If this line was already there before upgrading sys-apps/shadow, then it is a
major failure (or maybe critical) - losing lines from /etc/shadow can prevent
user from login.
Comment 3 P├ęter Werner 2006-03-16 02:51:45 UTC
See bug# 110416
Comment 4 Luca Longinotti (RETIRED) gentoo-dev 2006-09-30 08:38:22 UTC
The actual dev-db/postgresql ebuilds correctly set up their groups and users.
A solution posted in the forums is to simply run '/usr/sbin/pwconv' as root to fix this, but that isn't the ebuilds job.
Best regards, CHTEKK.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-10-19 04:47:02 UTC
*** Bug 110416 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-10-19 04:52:50 UTC
See Bug 151056, Comment #1. 

Closing.
Comment 7 MickKi 2007-06-06 21:30:35 UTC
(In reply to comment #4)
> The actual dev-db/postgresql ebuilds correctly set up their groups and users.
> A solution posted in the forums is to simply run '/usr/sbin/pwconv' as root to
> fix this, but that isn't the ebuilds job.

Shouldn't at least this solution be included in the Gentoo GPostgreSQL Guide?
-- 
Regards,
Mick