Multiuser linux to multiaccount samba printer

Anonymous anonymous at easysw.com
Fri Oct 8 04:09:21 PDT 2004


Bernhard Ege wrote:
> Michael Sweet wrote:
>
> > Search the message archive for posts about this; essentially, we
> > are working on an authentication mechanism but it won't be coming
> > anytime soon.  There is a patch to the existing smbspool program
> > that can be used to do some of this stuff, however we highly
> > recommend that you just use LPD on the Windows system for this
> > (Microsoft calls it "TCP/IP Printing Services") so that you don't
> > need to get a password for the user (the username for each job is
> > still passed)
>
> I will have a look, but as the encironment is a mixture of students and employees we have to have authentication of who is printing the job. Username alone is not acceptable as it is too easily faked (for instance, the students may use their own computer as may the employees).
>
> It is nice to hear that authentication is being worked upon.

I decided to make my own hack. I created a password storage module which is called when the smb backend is called (changed smb link to a script). Password is entered using a special print job (sends DISPLAY and XAUTH variables, command is lprpasswd, not the same as lppasswd which I don't know the use for) which will make the smb backend use the openssh-askpass command to get the password (obviously my solution requires X to work). The password module store the password only in memory and only root may retrieve it once entered (root access alone is not enough, though). This  solution will allow a linux user to store the username/password combination the samba printer requires. Username and password must be empty in the cups printer configuration. It uses using name-space unix sockets for communation which I think makes it linux only for now.

It works for me and I supply a link to those needing the same functionality:

http://www.miba.auc.dk/~bme/software/binaries/unix/cupspwdb/index.html

If lppasswd actually provides the functionality just described, my work was unnessecary but at least fun :-)

Bernhard





More information about the cups mailing list