Jump to content

Installation guide for Samba, Winbind, CUPS and PyKota


Recommended Posts

Posted

Webmin reports both 7.4 & 8.2 being installed but cannot start.

 

Me thinks something has gone all skewed.

 

I have tried starting them from the command line but no error is reported?

Posted

Check your pykota.conf file against your postfgres config. It is possible to connect to the DB via a local socket, via 127.0.0.1 or via IP depending upon setup.

 

Another option is to re-run the PyKota setup.... this blitzes the DB IIRC but will set it up again.

Posted
Webmin reports both 7.4 & 8.2 being installed but cannot start.

 

I'm no postgres expert (we use mysql here) but I don't think you can have two versions installed together without them conflicting...

Posted

Guys thanks for you input so far it has been much apreciated.

 

I have removed all instances of postgresql (7.4 & 8.3) rebooted the server, re-installed 7.4, re-ran the pksetup said NO to downloading updates, created the database with no errors.

 

I have 2 printers setup in CUPS one pykota managed and one CUPS manged they now BOTH work :)

 

I can access the printers via windows and add the to the XP & Vista PC's and can print to them.

 

Just have to sort quotas now.

 

Many Many Thanks again.

Posted

OK here goes last bit of config.

 

I have looked at the newUser script in the wiki and set it up as is:

 

#!/bin/bash

# Script to create new users for PyKota and assign initial
# balance.
# Script should be specified in the 'policy' section of
# pykota.conf

# Variable assignment
PYKOTAUSERNAME=$1
PYKOTAPRINTERNAME=$2
INITIALBALANCE=2

# If a pupil username limit by balance and assign inital quota
if echo "$PYKOTAUSERNAME" | grep -q ^[0-9]
       then pkusers -a -s -l balance -b $INITIALBALANCE $PYKOTAUSERNAME && edpykota -a -s -P $PYKOTAPRINTERNAME $PYKOTAUSERNAME

# If not a pupil, must be a staff member or test account so do
# not limit printing
       else pkusers -a -s -l noquota $PYKOTAUSERNAME && edpykota -a -s -P $PYKOTAPRINTERNAME $PYKOTAUSERNAME
fi

exit

 

In my case if I try to print as a student or teacher I get the following email:

 

Error in external policy script. Printing is denied.

Your system administrator :

ICT Support

 

I think it is to do with the check that is done to see if the user is staff or not and if I am reading this right this line:

 

if echo "$PYKOTAUSERNAME" | grep -q ^[0-9]

 

Checks to see if the user matches 0-9 my question is what is 0-9 and what do i need to check within my domain in order to change the check??

Posted

It's basically checking if the username has a number in it. If so it's presumed to be a pupil. Otherwise it's a member of staff. For example

 

jsmith07

jsmith08

jsmith

 

First two are pupils (year 7 and year 8 respecitvely) and the last is a staff member.

Posted

Ahh that makes sense.

 

I dont have users like that I wonder if I could change it to check group membership within the domain instead i.e if the group is students then hey guess what they must be a student.....

 

Does pykota have a group variable do you know??

Posted

pykota has groups, but they don't do what you want. A better alternative would be to ask samba to tell you what groups the user is in.

 

net -P user info $PYKOTAUSERNAME | grep 'pupils'

Posted

Geoff: I have added your one line to the script but it still fails:

 

#!/bin/bash

# Script to create new users for PyKota and assign initial
# balance.
# Script should be specified in the 'policy' section of
# pykota.conf

# Variable assignment
PYKOTAUSERNAME=$1
PYKOTAPRINTERNAME=$2
INITIALBALANCE=2

# If a pupil username limit by balance and assign inital quota
#if echo "$PYKOTAUSERNAME" | grep -q ^[0-9]
if echo net -P user info "$PYKOTAUSERNAME" | grep 'Students'
       then pkusers -a -s -l balance -b $INITIALBALANCE $PYKOTAUSERNAME && edpykota -a -s -P $PYKOTAPRINTERNAME $PYKOTAUSERNAME

# If not a pupil, must be a staff member or test account so do
# not limit printing
       else pkusers -a -s -l noquota $PYKOTAUSERNAME && edpykota -a -s -P $PYKOTAPRINTERNAME $PYKOTAUSERNAME
fi

exit

 

Any Ideas??

Posted (edited)

Done that but still get the Printing denied email....

 

IGNORE THE ABOVE

 

I found a typo it now all works :-)

Edited by ICTNUT
Posted

No problem, I got some ideas on how to improve my own setup along the way. :)

 

BTW, can you go thru the wiki article and expand points where you got stuck with more detail instructions. Obviously some improvements to the article are required. :)

Posted
BTW, can you go thru the wiki article and expand points where you got stuck with more detail instructions. Obviously some improvements to the article are required. :)

 

That would be the point of putting it on the wiki :p

  • 7 months later...
Posted
Hey everyone.

 

I have just done a similar set up in Beaumont School, St. Albans, Hertfordshire.

 

We have two Pykota servers running CUPS on Ubuntu 6.10. (Two because we have a one way trusted cross forest policy). I have a complete set of notes installing all dependencies and setting up servers from a blank install of Ubuntu. If anyone is interested please email me. They are pretty much in my shorthand but list all files and changes necessary! I have spent weeks getting them perfect and working out the small glitches. We don’t actually have Kerberos set up on the two machines as with a cross forest policy running, it doesn’t normally authenticate on either domain. It is still however joined with samba in the ADS mode to our two windows2003 domain controllers (One on each domain).

 

I have also tried the CUPS 6.0 windows drivers and after a week or so decided against then. I get my Linux box's to distribute/push out the original PCL drivers from manufactures. this means no horrible issues if a certain printer doesn’t support postscript (i.e. Brother 5140's) and no horrible Ghost Script issues (GS takes postscript code and makes it into an image file for non postscript printers to print... It doesn’t however work very well with the CUPS windows drivers). You an actually use windows to configure this part!

 

I’m now working on some more advanced Pykota handling, such as sending jobs to different printers based on content or size, or alerting users when they print a ridiculously large file.

 

I’ve also included a self written PHP management tool that can use LDAP to manage pupils from AD. It allows searching, home folder viewing, Pykota quota management and password changing functionality over SSL. At the moment it is purely for our school and written to match our OU structure. If any one is interested in this also let me know as I have been meaning to make a generic version. (We decided to try and replace the non functional functionality of Viglen Classlink... and this is what we came up with!)

 

Ric_ is correct with his external policy. Ours auto creates users and assigns them a balance. There is a script in place to try and query there email address from AD... but to be honest it doesn’t yet work!

 

The work of a technician is never finished! :twisted:

 

I can't find your mail !!!

  • 3 months later...
  • 9 months later...
Posted
I have also tried the CUPS 6.0 windows drivers and after a week or so decided against then. I get my Linux box's to distribute/push out the original PCL drivers from manufactures. this means no horrible issues if a certain printer doesn’t support postscript (i.e. Brother 5140's) and no horrible Ghost Script issues (GS takes postscript code and makes it into an image file for non postscript printers to print... It doesn’t however work very well with the CUPS windows drivers). You an actually use windows to configure this part!

 

The above is invaluable advice... I only just spotted it, and moved 2 colour printers to using their PCL manufacturer drivers. We're using an accounting method which calls pkpgcounter directly, which was previously having to use GS to process the documents (and was taking ages). Now it all passes through insanely quickly, hopefully that will make the teachers happier!

  • 7 years later...
Posted

Hi guys,

I don't know if this project is still alive.

10 years later CUPS worked like a charm for me...

Now I'll try to contact NeoS to request his help

 

:)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...