Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159047 - sys-block/partimage-0.6.4-r4 incorrect pam config and dependencies
Summary: sys-block/partimage-0.6.4-r4 incorrect pam config and dependencies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Zoffoli (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 185203
  Show dependency tree
 
Reported: 2006-12-24 16:37 UTC by Maciej Grela
Modified: 2008-01-15 12:06 UTC (History)
2 users (show)

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


Attachments
Partimaged server logs (partimaged.log,47.40 KB, text/plain)
2006-12-24 16:40 UTC, Maciej Grela
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Grela 2006-12-24 16:37:38 UTC
Hi

When trying to set up a partimage-0.6.4-r4 image server (partimaged) I encountered a few problems with authenticating users via PAM. The main issue was with the partimaged.pam file supplied by portage:

# PAM config file for Partimaged

auth    required        pam_unix.so
auth    required        pam.warn.so
auth    sufficient      pam_userdb.so \
        db=/etc/partimaged/passwd
auth    required        pam_listfile.so \
        onerr=fail item=user sense=allow \
        file=/etc/partimaged/partimagedusers

account sufficient      pam_userdb.so \
        debug db=/etc/partimaged/passwd

This file is obviously broken, there is no module named pam.warn.so, it should be pam_warn.so Also the pam_userdb module is used, which isn`t built by default (at least in pam-0.99.6.3-r2). I managed to login after removing reference to pam_userdb and replacing it with pam_listfile for both auth and account:

# PAM config file for Partimaged

auth    required        pam_unix.so
auth    required        pam_warn.so
auth    required        pam_listfile.so \
        onerr=fail item=user sense=allow \
        file=/etc/partimaged/partimagedusers

account         sufficient      pam_listfile.so \
        onerr=fail item=user sense=allow \
        file=/etc/partimaged/partimagedusers

After these changes I managed to log in into the partimaged server. However a problem still remains. When the client disconnects after logging in and performing some operation (ie. saving an image) the server refuses to accept further logins from that user. It doesn`t matter whether the operation was completed successfully or not. On the second login attempt PAM returns "Authorization error" and the connection is rejected. When you restart partimaged all works well again. Has anyone else seen this problem ? My emerge --info:

Portage 2.1.2_rc3-r8 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r2-idaho i686)
=================================================================
System uname: 2.6.18-gentoo-r2-idaho i686 Intel(R) Pentium(R) M processor 1.80GHz
Gentoo Base System version 1.12.8
Last Sync: Mon, 25 Dec 2006 00:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe"
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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distcc distlocks metadata-transfer nodoc parallel-fetch sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://src.gentoo.pl"
LANG="pl_PL.utf8"
LC_ALL="pl_PL.utf8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="pl"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X aac acl acpi alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol automount bash-completion berkdb bitmap-fonts bzip2 caps cli cracklib crypt cscope cups dbus dlloader dri dts dv dvd dvdr elibc_glibc encode esd flac fortran ftp gdbm gif gnutls gpm hal iconv idn input_devices_evdev input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 isdnlog jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kernel_linux libg++ linguas_pl logrotate lzo mad mailwrapper mmx mmxext mp3 ncurses nfs nls nptl nptlonly ogg opengl pam pcmcia pcre pdf perl png ppds pppd python qt3 quicktime quotas readline real reflection rtc samba session slp speex spl sqlite sse sse2 ssl svg syslog tcpd tga theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_radeon video_cards_vesa vorbis win32codecs x264 xcomposite xinerama xml xorg xv xvid xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Maciej Grela 2006-12-24 16:40:59 UTC
Created attachment 104696 [details]
Partimaged server logs 

These are the logs of a partimaged server when second authentication attempt is rejected (despite giving the same login and password). Notice the "Nieudana autoryzacja" which is "Authorization error" in polish (near the end of the file) - that`s from the second failed login attempt.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-09-04 00:28:35 UTC
Ping!
Comment 3 Maciej Grela 2007-09-10 10:57:07 UTC
(In reply to comment #2)
> Ping!
> 

Pong!
Comment 4 Christian Zoffoli (RETIRED) gentoo-dev 2008-01-15 12:06:55 UTC
fixed in CVS (0.6.6), please test and reopen if needed.