Here we go !!!
# Generate Password
0 5 * * 1 if [ -f /var/run/mysqld/mysqld.pid ]; then
/usr/local/pf/addons/generatePassword.sh; fi
#/bin/bash
#
# Generate random guest password
#
PASSWORD=`< /dev/urandom tr -dc a-z0-9 | head -c8`
#Add it to invite.conf
htpasswd -b /usr/local/pf/conf/invite.conf invite ${PASSWORD}
#Add it to a plaintext file
if [ ! -f /usr/local/pf/conf/invite.plaintext ]; then
touch /usr/local/pf/conf/invite.plaintext
fi
echo "#Generated on `date`" > /usr/local/pf/conf/invite.date
echo "${PASSWORD}" > /usr/local/pf/conf/invite.plaintext
#Mail the password
SUBJECT="IT - Password of the week"
EMAIL="[email protected]"
mail -s "$SUBJECT" "$EMAIL" <<EOM
Hi Guys,
Here the password of the week for the "invite" user:
Username: invite
Password: ${PASSWORD}
Regards
Password Generator
EOM
Then create a file authentication source that use this file
/usr/local/pf/conf/invite.conf
Fabrice
Le 2016-10-05 à 17:19, Rokkhan a écrit :
Hi,
How should I configure password of the day for guests users?. I
have seen that is available but I do not know how to configure
following the manual.
Greetings.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users