Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142293 - PAM auth doesn't work on app-admin/webmin-1.290
Summary: PAM auth doesn't work on app-admin/webmin-1.290
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-31 09:18 UTC by José Valentín Gutiérrez Boquete
Modified: 2006-12-01 17:29 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description José Valentín Gutiérrez Boquete 2006-07-31 09:18:01 UTC
i can't log into webmin using PAM auth (using sys-libs/pam-0.78-r3).. always refuse my password, with USE="-pam" webmin works OK

/var/log/webmin/miniserv.error:
[31/Jul/2006:17:59:54 +0200] miniserv.pl started
[31/Jul/2006:17:59:54 +0200] PAM authentication enabled

/var/log/messages:
Jul 31 18:00:09 multivac webmin[19301]: Invalid login as root from 213.60.73.55

/etc/pam.d/webmin:
auth    required        pam_unix.so     nullok
account required        pam_unix.so
session required        pam_unix.so


Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r9 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
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-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-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 /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer multilib-strict sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.inode.at/"
LANG="es_ES@euro"
LC_ALL="es_ES@euro"
LINGUAS="es"
MAKEOPTS="-j3"
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="amd64 X alsa avi berkdb bitmap-fonts bzip2 cli crypt cups dlloader dri eds emboss encode foomaticdb fortran gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde lzw lzw-tiff mp3 mpeg ncurses nls nptl opengl pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection sdl session smp spell spl ssl tcpd tiff truetype-fonts type1-fonts usb xorg xpm xv zlib elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mouse kernel_linux linguas_es userland_GNU video_cards_nv video_cards_apm video_cards_v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Andrew Kay 2006-09-15 11:26:46 UTC
Was having same problem. Issue seems to be defaults set in /etc/pam.d/webmin are not correct for my system.

I use the following webmin file and authentication seems to work fine:

<code>
#%PAM-1.0
auth       sufficient   pam_unix.so likeauth nullok

account    required     pam_unix.so

password   sufficient   pam_unix.so nullok md5 shadow use_authtok

session    required     pam_limits.so
session    required     pam_unix.so
</code>

I also use the following config in Webmin > Webmin Configuration > Authentication:
( X & O == check boxes (X == checked), [] == input fields )

<code>
Authentication and session options
O Disable password timeouts
X Enable password timeouts
  O  Block hosts with more than [] failed logins for [] seconds.
X Log blocked hosts, logins and authentication failures to syslog

O Disable session authentication
X Enable session authentication
  O Auto-logout after [] minutes of inactivity
  X Offer to remember login permanently?
  X Show hostname on login screen?
    O Show real hostname instead of name from URL?
  O Record logins and logouts in Utmp?
  X No pre-login page
  O Show pre-login file [] 

X Always require username and password
O Allow login without password for matching users from localhost

X Use PAM for Unix authentication, if available
O Never use PAM for Unix authentication
  If PAM is unavailable or disabled, read users and passwords from file [/etc/shadow] columns [0] and [1]
  X Support full PAM conversations?

When using Unix authentication ..
O Always deny users with expired passwords
O Always allow users with expired passwords
X Prompt users with expired passwords to enter a new one

External squid-style authentication program []

O Use standard Unix crypt encryption for Webmin passwords
X Use MD5 encryption for Webmin passwords (allows long passwords)
</code>
Comment 2 Andrew D Kirch 2006-09-20 08:26:26 UTC
I'm having the same problem on a non-amd64 machine.  I'm therefore bumping the hardware to all (webmin is not binary, and this is confirmed on amd64 and x86)

 The sed-foo in the ebuild 
pkg_postinst() {
        local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :)
        crypt=${crypt//\\/\\\\}
        crypt=${crypt//\//\\\/}
        sed -i -e "s/root:XXX/root:${crypt}/" /etc/webmin/miniserv.users

does not seem to work as I end up with root:XXX in miniserv.users.  specifying from / most likely breaks the sandbox.

emerge info is below as per usual. 
Portage 2.1.1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r6 i686)
=================================================================
System uname: 2.6.16-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.4
Last Sync: Wed, 13 Sep 2006 19:30:05 +0000
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
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-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -pipe"
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="-O3 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/"
LINGUAS=""
MAKEOPTS="-j3"
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="/root/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm arts berkdb bitmap-fonts bzip2 cli contentcache crypt cups dlloader dri eds elibc_glibc emboss encode esd foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk2 imagemagick imlib inode input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg jpgraph kde kernel_linux latex libg++ libwww mad math mikmod motif mp3 mpeg mysql mysqli ncurses nls nptl nptlonly ogg opengl oss pam pcre perl php png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd threads 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 vorbis xml xmms xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Simon Stelling (RETIRED) gentoo-dev 2006-09-20 08:29:08 UTC
thanks for the follow-up
Comment 4 Andrew Kay 2006-09-23 06:41:10 UTC
Bit of followup. My login failed after about 5-6 logins. I had to uncheck/disable 'Support full PAM conversations?' and it seems to be working again. Will followup in a few days to confirm if this change is valid or not.

When it broke (both times) the error in the logs was: [webmin(pam_unix)] authentication failure; logname=andrew uid=0 euid=0 tty= ruser= rhost=  user=root
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-12-01 17:29:11 UTC
try -r1, reopen if still broken.