WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED FOR NOW]help needed if possible with PAM  (Read 3169 times)

aus9

  • Guest
[SOLVED FOR NOW]help needed if possible with PAM
« on: April 27, 2013, 10:19:53 AM »
Hi

I lack the skills to know where I am going wrong so lets start at the beginning

I am attempting to compile cups and have done so  but not confident the build is correct.

The trouble is, I am trying to compile a bit of PAM module and I can't see it.

my configure line is
Quote
./configure --prefix=/usr/local --sysconfdir=/usr/local/etc --localstatedir=/var \
--enable-libpaper --disable-libusb --enable-dbus --with-dbusdir=/usr/local/etc/dbus-1 \
--enable-ssl --disable-gnutls --enable-openssl --enable-avahi --enable-dnssd \
--with-cups-user=tc --with-cups-group=staff --with-system-groups=root \
--enable-pam --with-pam-module=pam_unknown.so  --enable-largefile --with-printcap=/usr/local/etc/printcap

The reason why I chose module=pam_unknown.so is because of the contents of a m4 file dated 23/04/2012 called cups-pam.m4 whose contents are
Code: [Select]
dnl
dnl "$Id: cups-pam.m4 10424 2012-04-23 17:26:57Z mike $"
dnl
dnl   PAM stuff for CUPS.
dnl
dnl   Copyright 2007-2012 by Apple Inc.
dnl   Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl   These coded instructions, statements, and computer programs are the
dnl   property of Apple Inc. and are protected by Federal copyright
dnl   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
dnl   which should have been included with this file.  If this file is
dnl   file is missing or damaged, see the license at "http://www.cups.org/".
dnl

AC_ARG_ENABLE(pam, [  --disable-pam           disable PAM support])
AC_ARG_WITH(pam_module, [  --with-pam-module       specify the PAM module to use])

dnl Don't use PAM with AIX...
if test $uname = AIX; then
enable_pam=no
fi

PAMDIR=""
PAMFILE="pam.std"
PAMLIBS=""
PAMMOD="pam_unknown.so"
PAMMODAUTH="pam_unknown.so"

if test x$enable_pam != xno; then
SAVELIBS="$LIBS"

AC_CHECK_LIB(dl,dlopen)
AC_CHECK_LIB(pam,pam_start)
AC_CHECK_LIB(pam,pam_set_item,AC_DEFINE(HAVE_PAM_SET_ITEM))
AC_CHECK_LIB(pam,pam_setcred,AC_DEFINE(HAVE_PAM_SETCRED))
AC_CHECK_HEADER(security/pam_appl.h)
if test x$ac_cv_header_security_pam_appl_h != xyes; then
AC_CHECK_HEADER(pam/pam_appl.h,
AC_DEFINE(HAVE_PAM_PAM_APPL_H))
fi

if test x$ac_cv_lib_pam_pam_start != xno; then
# Set the necessary libraries for PAM...
if test x$ac_cv_lib_dl_dlopen != xno; then
PAMLIBS="-lpam -ldl"
else
PAMLIBS="-lpam"
fi

# Find the PAM configuration directory, if any...
for dir in /private/etc/pam.d /etc/pam.d; do
if test -d $dir; then
PAMDIR=$dir
break;
fi
done
fi

LIBS="$SAVELIBS"

case "$uname" in
Darwin*)
# Darwin/OS X
if test "x$with_pam_module" != x; then
PAMFILE="pam.$with_pam_module"
elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
PAMFILE="pam.opendirectory"
else
PAMFILE="pam.securityserver"
fi
;;

*)
# All others; this test might need to be updated
# as Linux distributors move things around...
if test "x$with_pam_module" != x; then
PAMMOD="pam_${with_pam_module}.so"
elif test -f /lib/security/pam_unix2.so; then
PAMMOD="pam_unix2.so"
elif test -f /lib/security/pam_unix.so; then
PAMMOD="pam_unix.so"
fi

if test "x$PAMMOD" = xpam_unix.so; then
PAMMODAUTH="$PAMMOD shadow nodelay"
else
PAMMODAUTH="$PAMMOD nodelay"
fi
;;
esac
fi

AC_SUBST(PAMDIR)
AC_SUBST(PAMFILE)
AC_SUBST(PAMLIBS)
AC_SUBST(PAMMOD)
AC_SUBST(PAMMODAUTH)

dnl
dnl End of "$Id: cups-pam.m4 10424 2012-04-23 17:26:57Z mike $".
dnl

Since that file has no date change, I am assuming the module has not changed from anything I do with my configure line.

Feel free to correct my thinking
AFAIK, I can't install to /tmp so have to use a touch /tmp/mark and install into system and use list to find what files to go where
as a result I can see one file being created, which is
/tmp/cups/usr/local/etc/pam.d
Quote
auth   required   pam_unknown.so nodelay
account   required   pam_unknown.so

SIDETRACK in current cups that config file uses the module pam_unix.so and that so file exists in Linux-Pam under
/usr/local/lib/security

but after install , if I am supposed to have that other module name, it does not exist in that pathway nor in the list output.

As you can tell, PAM is not my strength. In case my eyesight is playing up lets try
Code: [Select]
sudo find / -name pam_unknown.so but it produces no hits

thanks for reading

Questions
1)
Is this some kind of trick? and should I try the other modules I can see in the m4 they are: pam_unix.so, pam_unix2.so

2)  Or
Am I supposed to modify those pathways I can see in the m4 eg /lib/security?
« Last Edit: April 28, 2013, 06:00:31 AM by aus9 »

aus9

  • Guest
Re: help needed if possible with PAM
« Reply #1 on: April 28, 2013, 02:29:40 AM »
current cups does not have pam, my apols

must be corrupt build from me, back to the olde drawing board

edit
I was looking at a cups config for daemon from a diff distro.
« Last Edit: April 28, 2013, 05:40:23 AM by aus9 »

aus9

  • Guest
Re: [SOLVED FOR NOW]help needed if possible with PAM
« Reply #2 on: April 28, 2013, 06:16:41 AM »
ok I have solved by cheating and using a config file from another distro

I have not worked out how to re-config the m4 file but who cares

I can now login to cups 1.6.2 now to test dependencies for an USB direct cable TC to epson TX-100

yep qpdf

woo hoo
contents of page log.............localhost:631/admin/log/page_log?
Code: [Select]
EPSON_Stylus_TX100 tc 5 [28/Apr/2013:18:13:22 +0000] 1 1 - localhost Leafpad job #2 - -

it printed

 ;D ;D

##########

lots more testing to go but we are now closer to the end