This tutorial will explain howto setup Home print server using CUPS
First you need to download this script using the following command
Now you need to give execute permissions to the easyldap-installer.sh script
chmod +x easyldap-installer.sh
Run this script using the following command
sudo sh easyldap-installer.sh
If you want more details check this and credit goes to the author.