Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219184 - Emerging sys-apps/openrc with pam useflag results in an unusable start-stop-demon command
Summary: Emerging sys-apps/openrc with pam useflag results in an unusable start-stop-d...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
: 292632 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-24 19:05 UTC by paulphilippe
Modified: 2009-11-10 04:13 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
test-pam.c (test-pam.c,2.89 KB, text/plain)
2008-05-21 07:34 UTC, Peter Volkov (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description paulphilippe 2008-04-24 19:05:04 UTC
When openrc is built with the default pam useflag, start-stop-daemon cannot be use during the system boot because of insufficient permission. This results in several services not being started during boot. Furthermore, it seems to want to use mdev while rc.conf is set to udev. I have included the link to the forum post on this topic.

Here is a sample of my error messages
mycomputer ~ # rc
 * Starting D-BUS system messagebus ...
 * start-stop-daemon: pam error: Permission denied
 * start-stop-daemon: failed to start `/usr/bin/dbus-daemon'                                                             [ !! ]
 * ERROR: dbus failed to start
 * ERROR: cannot start cupsd as dbus would not start
 * ERROR: cannot start hald as dbus would not start
 * Starting lisa ...
 * start-stop-daemon: pam error: Permission denied
 * Failed to start lisa                                                                                                  [ !! ]
 * ERROR: lisa failed to start
 * Starting ntpd ...
 * start-stop-daemon: pam error: Permission denied
 * start-stop-daemon: failed to start `/usr/sbin/ntpd'
 * Failed to start ntpd                                                                                                  [ !! ]
 * ERROR: ntpd failed to start
 * samba -> start: smbd ...
 * start-stop-daemon: pam error: Permission denied                                                                       [ !! ]
 * samba -> start: nmbd ...
 * start-stop-daemon: pam error: Permission denied                                                                       [ !! ]
 * Error: starting services (see system logs)
 * samba -> stop: smbd ...                                                                                               [ ok ]
 * samba -> stop: nmbd ...                                                                                               [ ok ]
 * ERROR: samba failed to start
 * Starting sshd ...
 * start-stop-daemon: pam error: Permission denied
 * start-stop-daemon: failed to start `/usr/sbin/sshd'                                                                   [ !! ]
 * ERROR: sshd failed to start
 * Starting vixie-cron ...
 * start-stop-daemon: pam error: Permission denied                                                                       [ !! ]
 * ERROR: vixie-cron failed to start
mycomputer ~ # 

I could only get the error output for mdev: mdev.conf : no such file or directory. So I have emerged openrc without pam useflag and my system boots without any of these error messages and all set services start normally.



Reproducible: Always

Steps to Reproduce:
1.emerge -av openrc 
2.reboot system in linux
3.

Actual Results:  
System boots but services such as sshd, cupsd and xdm don't start.

Expected Results:  
System boot without the error messages. 

emerge --info
Portage 2.1.5_rc5 (default-linux/x86/2007.0/desktop, gcc-4.2.3, glibc-2.7-r2, 2.6.24-gentoo-r2 i686)
=================================================================
System uname: 2.6.24-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Sat, 19 Apr 2008 19:04:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.5.2-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache cvs distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.nrc.ca/pub/systems/linux/gentoo/ http://mirror.tucdemonic.org/gentoo/ ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/  http://gentoo.netnitco.net ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
LDFLAGS=""
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/science /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac aalib acl acpi alsa ansi arts berkdb cairo cdr cli cracklib crypt cups dbus divx4linux dri dvd dvdr dvdread eds emboss encode esd evo faad2 fam fbdev firefox flac fortran gcj gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kde kerberos ldap live m4a mad midi mikmod mp3 mp4 mpeg mudflap nas ncurses network nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection sdl seamonkey session spell spl ssl svg tcpd tiff truetype unicode vorbis win32codecs wma wmv x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1  emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m    maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa vga fbdev nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2008-04-24 19:31:00 UTC
Sounds like your entire pam config is hosed.. re-emerge pam and pambase and run etc-update
Comment 2 paulphilippe 2008-04-24 22:15:10 UTC
(In reply to comment #1)
> Sounds like your entire pam config is hosed.. re-emerge pam and pambase and run
> etc-update
> 

Hi,

Re-emering pam, pambase and re-running etc-update didn't solve the problem. I re-emerged openrc with pam useflag enabled and the same error messages reappeared. Is there another way reset my pam login?

Thanks,
Paul
Comment 3 Juergen Schinker 2008-05-19 08:05:40 UTC
i confirm this bug
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2008-05-19 14:40:06 UTC
Well until someone can provide some steps to reproduce this we're still at square one.

I have over 15 machines built with the following USE flag combination without a hitch...

[ebuild   R   ] sys-apps/openrc-0.2.4-r1  USE="ncurses pam unicode -debug" 0 kB
Comment 5 Juergen Schinker 2008-05-19 16:08:49 UTC
Reproduce:

take an old ~x86 machine

emerge baselayout2  and voila

and i admit that pam is manually set to auth agains kerberos

Juergen
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2008-05-19 19:38:32 UTC
Do you have user "nobody" on your system? If not attach /etc/pam.d/start-stop-daemon file.
Comment 7 Juergen Schinker 2008-05-20 20:37:20 UTC
have nobody based on ldap  and
/etc/pam.d/start-stop-daemon

auth            required        pam_permit.so
account         required        pam_permit.so
password        required        pam_deny.so
session         optional        pam_limits.so
Comment 8 Peter Volkov (RETIRED) gentoo-dev 2008-05-21 07:34:05 UTC
Created attachment 153833 [details]
test-pam.c

Well, I don't see where the error is... Try to compile attached code with:
gcc test-pam.c -o test -lpam

add "debug" at the end of each line in /etc/pam.d/start-stop-daemon:
#%PAM-1.0

auth            required        pam_permit.so debug
account         required        pam_permit.so debug
password        required        pam_deny.so debug
session         optional        pam_limits.so debug

and run this program
./test

and show us output of this program and syslog messages. May be this gives some hints.
Comment 9 Juergen Schinker 2008-05-21 20:15:49 UTC
did what you asked me
bur result is exactly nothing
result of test ist nothing and syslog also nothing

sorry
Comment 10 Doug Goldstein (RETIRED) gentoo-dev 2008-10-07 15:34:25 UTC
Any more info here guys?
Comment 11 Doug Goldstein (RETIRED) gentoo-dev 2008-12-24 15:08:37 UTC
Need more info on this issue.
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2009-11-10 04:13:48 UTC
*** Bug 292632 has been marked as a duplicate of this bug. ***