Changeset 1757

Show
Ignore:
Timestamp:
09/29/04 22:20:52 (20 years ago)
Author:
jalet
Message:

Added the winbind_separator directive to pykota.conf to allow the admin to
strip out the Samba/Winbind domain name when users print.

Location:
pykota/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/conf/pykota.conf.sample

    r1746 r1757  
    186186# Some people reported that WinXP sends mixed case usernames 
    187187# setting 'utolower: Yes' solves the problem. 
    188 # Of course you have to user lowercase only when adding 
     188# Of course you have to use lowercase only when adding 
    189189# users with edpykota, because ALL database accesses are 
    190190# still case sensitive. 
     
    192192# If utolower is Yes, the usernames received from the printing 
    193193# system is converted to lowercase at the start of the cupspykota 
    194 # backend or of the pykota filter. 
     194# backend or of the lprngpykota filter. 
    195195# 
    196196# If utolower is No, which is the default, strict case checking 
     
    198198# different. Printer and groups names are ALWAYS case sensitive. 
    199199utolower: No 
     200 
     201# Should we split usernames on a specific separator when printing ? 
     202# Default is No, i.e. if the value is unset. 
     203# This is a global option only. 
     204# This option adds support for Samba's Winbind utility, which 
     205# prefixes usernames with domain name and separator character. 
     206# Of course if you set this then you have to use NO separator when  
     207# adding users with edpykota. 
     208# 
     209# If winbind_separator is set, the usernames received from the printing 
     210# system are split on the separator's value, and only the last part 
     211# (real username) is used. 
     212# 
     213# If winbind_separator is not set, which is the default, strict  
     214# username equality checking will be done (modulo the setting 
     215# of the 'utolower' directive), this means that users 'DOMAIN1/jerome', 
     216# 'Domain2/jerome' and 'jerome' are different.  
     217# winbind_separator: / 
    200218 
    201219# What is the accounting backend to use 
  • pykota/trunk/NEWS

    r1755 r1757  
    2222PyKota NEWS : 
    2323 
     24    - 1.20alpha18 : 
     25     
     26        - Added the new "winbind_separator" directive to strip 
     27          out the Samba/Winbind domain name while printing if 
     28          needed (Off by default). 
     29           
    2430    - 1.20alpha17 : 
    2531     
  • pykota/trunk/pykota/config.py

    r1687 r1757  
    2222# 
    2323# $Log$ 
     24# Revision 1.52  2004/09/29 20:20:52  jalet 
     25# Added the winbind_separator directive to pykota.conf to allow the admin to 
     26# strip out the Samba/Winbind domain name when users print. 
     27# 
    2428# Revision 1.51  2004/08/31 23:29:53  jalet 
    2529# Introduction of the new 'onaccountererror' configuration directive. 
     
    530534        """Returns 1 if we want to convert usernames to lowercase when printing, else 0.""" 
    531535        return self.isTrue(self.getGlobalOption("utolower", ignore=1)) 
     536         
     537    def getWinbindSeparator(self) :           
     538        """Returns the winbind separator's value if it is set, else None.""" 
     539        return self.getGlobalOption("winbind_separator", ignore=1) 
  • pykota/trunk/pykota/tool.py

    r1756 r1757  
    2222# 
    2323# $Log$ 
     24# Revision 1.123  2004/09/29 20:20:52  jalet 
     25# Added the winbind_separator directive to pykota.conf to allow the admin to 
     26# strip out the Samba/Winbind domain name when users print. 
     27# 
    2428# Revision 1.122  2004/09/28 21:38:56  jalet 
    2529# Now computes the job's datas MD5 checksum to later forbid duplicate print jobs. 
     
    959963         
    960964        self.username = self.username or 'root' # when printing test page from CUPS web interface, username is empty 
     965         
     966        # do we want to strip out the Samba/Winbind domain name ? 
     967        separator = self.config.getWinbindSeparator() 
     968        if separator is not None : 
     969            self.username = self.username.split(separator)[-1] 
     970             
     971        # do we want to lowercase usernames ?     
    961972        if self.config.getUserNameToLower() : 
    962973            self.username = self.username.lower() 
     974             
    963975        self.preserveinputfile = self.inputfile  
    964976        try : 
  • pykota/trunk/pykota/version.py

    r1751 r1757  
    2222# 
    2323 
    24 __version__ = "1.20alpha17_unofficial" 
     24__version__ = "1.20alpha18_unofficial" 
    2525 
    2626__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" 
  • pykota/trunk/TODO

    r1755 r1757  
    2828        - Maybe put "gracedelay" in the database. 
    2929         
    30         - Allow admin to specify a prefix to delete from 
    31           usernames when printing, just like what is done 
    32           for the "utolower" directive. 
    33           Better : allow the admin to set the Samba's 
    34           winbind separator value (or do this automatically) 
    35           and split the domain from the username automagically 
    36           (but only if the admin asks so). 
    37            
    3830        - Price multiplier/divisor which can be set on a per 
    3931          user or per user group basis.