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

Bug 151056

Summary: User-Line not added to /etc/shadow after fresh postgreSQL install
Product: Gentoo Linux Reporter: Nick Fankhauser <nick>
Component: [OLD] ServerAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WORKSFORME    
Severity: minor CC: esigra, hans.schou
Priority: High    
Version: 2006.1   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nick Fankhauser 2006-10-12 11:42:36 UTC
I emerged postgreSQL, then (following the howto), I did "passwd postgres" and got this error: "passwd: Authentication token manipulation error". 
I contineued the howto anyway by running emerge config and so on. It worked, but everytime I started/restarted postgreSQL, I got the same warning as the above error.
It turned out (thanks to the forums at http://forums.gentoo.org/viewtopic-t-505771-highlight-.html) that it can be fixed by running "pwconv". This adds a missing line for the postgres user to /etc/shadow 
.

Here is my emerge --info:
=================================================================
System uname: 2.6.17-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.12.5
Last Sync: Mon, 09 Oct 2006 08:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.solnet.ch/mirror/Gentoo ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo rsync://linux.rz.ruhr-uni-bochum.de/gentoo/ rsync://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ rsync://ftp-stud.fht-esslingen.de/gentoo/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo"
LINGUAS="en de fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apache2 berkdb bitmap-fonts cli crypt dba dlloader dri elibc_glibc fortran gd gdbm gpm input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog kernel_linux ldap libg++ linguas_de linguas_en linguas_fr mailwrapper mbox mysql ncurses nls nptl nptlonly pam pcre perl php png pop3d postgres ppds pppd python readline reflection sasl session snmp spl sqlite ssl tcpd truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo xml xml2 xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2006-10-12 23:22:03 UTC
this is because postgres was added to your /etc/passwd by baselayout rather than by enewuser which would have taken care of updating /etc/shadow

since baselayout no longer provides postgres, and there isnt really anything we can do about this situation, this WORKSFORME
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-10-19 04:44:02 UTC
*** Bug 151941 has been marked as a duplicate of this bug. ***
Comment 3 Hans Schou 2006-10-19 05:01:43 UTC
> since baselayout no longer provides postgres, and there isnt really anything we
> can do about this situation, this WORKSFORME

Add the command below to the postgresql installation

[ -z "$(grep ^postgres: /etc/shadow)" ] && echo 'postgres:!:13380:0:99999:7:::' >> /etc/shadow
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-10-19 05:13:40 UTC
(In reply to comment #3)
> Add the command below to the postgresql installation
> 
> [ -z "$(grep ^postgres: /etc/shadow)" ] && echo 'postgres:!:13380:0:99999:7:::'
> >> /etc/shadow
> 

1) That is not going to work on BSD systems
2) postgresql ebuilds use enewuser, so the correct solution is to remove postgres user from your local /etc/passwd and then re-emerge