From: thib Date: Fri, 2 Nov 2001 13:37:47 +0000 (+0000) Subject: Initial revision X-Git-Tag: ver1564~166 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=720ec44493f6c77698119a0a03dfd130ec85d7aa;p=fcron Initial revision --- diff --git a/files/fcrontab.pam b/files/fcrontab.pam new file mode 100644 index 0000000..063701c --- /dev/null +++ b/files/fcrontab.pam @@ -0,0 +1,21 @@ +# +# The PAM configuration file for fcrontab +# + +### WARNING : you cannot use every modules here, as some (such as pam_unix_acct.so) +### require the program to be run by root or suid root, and fcrontab is *not* +### suid root. + + +### By default we do not ask user for a password +auth required pam_nologin.so +#auth required pam_unix.so nullok +auth required pam_env.so + +### Do not limit access to the authentificated user +account required pam_permit.so +### or limit him : +#account required pam_time.so + +session required pam_unix.so + diff --git a/script/install-pam-conf b/script/install-pam-conf new file mode 100755 index 0000000..2cfdae9 --- /dev/null +++ b/script/install-pam-conf @@ -0,0 +1,35 @@ +#!/bin/sh +# Install fcron and fcrontab's pam conf files. +# + +# $Id: install-pam-conf,v 1.1 2001-11-02 13:40:13 thib Exp $ + +if test $# -ne 5; then + echo "Too few/many arguments" + exit 1 +fi + +SRCDIR=$1 +ETC=$2 +ROOTNAME=$3 +ROOTGROUP=$4 +INSTALL=$5 + +for i in fcron fcrontab; do +# test for both space and tab in the grep + if test -f $ETC/pam.d/$i || grep "$i[ ]" $ETC/pam.conf 1> /dev/null; then + echo "Seems that there is already some pam conf about $i ..." + else + if test -d $ETC/pam.d; then + $INSTALL -m 644 -o $ROOTNAME -g $ROOTGROUP $SRCDIR/files/$i.pam $ETC/pam.d/$i || exit 1 + else + cat $SRCDIR/files/$i.pam | sed "s/account/$i account/" \ + | sed "s/auth/$i auth/" \ + | sed "s/session/$i account/" \ + | sed "s/password/$i account/" \ + >> $ETC/pam.conf || exit 1 + fi + fi +done + +exit 0 \ No newline at end of file