Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!fox!portal!atari!imagen!sun!newstop!east!hinode!geoff From: geoff@hinode.East.Sun.COM (Geoff Arnold @ Sun BOS - R.H. coast near the top) Newsgroups: comp.protocols.nfs Subject: Re: PC-NFS Printing - User name variations Message-ID: <1264@east.East.Sun.COM> Date: 15 Dec 89 01:14:42 GMT References: <1989Dec7.004957.1105@sjuphil.uucp> <705@pbseps.UUCP> Sender: news@east.East.Sun.COM Reply-To: geoff@East.Sun.COM (Geoff Arnold @ Sun BOS - R.H. coast near the top) Distribution: usa Organization: Sun Microsystems PC-NFS Engineering Lines: 53 Quoth perl@pbseps.PacBell.COM (Richard Perlman) (in <705@pbseps.UUCP>): #In article <1989Dec7.004957.1105@sjuphil.uucp> lyle@sjuphil.UUCP (Wayne J. Lyle) writes: #>What I would like to know is how does pc-nfs send the file to the #>system so that sometimes it is owned by root and other times it is #>owned by the user logged in from the PC level???? Is it random? # #Simple: If the user does not enter the right password (or no #password) when "logging-in" to PC-NFS, AND they either "Abort" or #"Ignore" PC-NFS's offer to try again, they are assigned the user #ID "nobody". UNIX UID number "-2". True so far. #For some reason (perhaps Geoff Arnold will enlighten), the host #prints the job as root instead of "nobody." However, in either #case you won't have useful accounting information. Two explanations have been suggested. I pick my words advisedly, because I can't make it fail in-house!!! The first is that "pcnfsd" has a bug in it: the calls to set the uid and gid should be switched. The second is that "lpr" sometimes looks at the real uid/gid instead of the effective uid/gid: since PCNFSD is typically owned by root, root owns the job. On a related note, it has been pointed out that lpr will often use a bogus jobname if pcnfsd is configured to use a very long path to the spool directory. You can fix this by modifying pcnfsd so that the child process chdir's to the spool directory before issuing the lpr: apparently (some) lpr's dislike very long paths as arguments. However one generic problem is that every Un*x implementation (and every site?) seems to hack the printing stuff differently - different spool directories, permissions, etc. Which brings me to the last point: #There may be a way to have your SUN host refuse print services to #users who do not login properly, Geoff? You all get a copy of the source to pcnfsd on the PC-NFS distribution diskettes. (And if you don't have a copy, I can post one.) It's there in source so that you can adapt it, guys! If you want to stop "nobody" from printing, then add the code. If you want to log all PC-NFS logins to a file, do so! And please share the results with us. As I posted some months ago, we want input on what should go into the next rev of the PCNFSD protocol. Geoff Geoff Arnold, PCDS Group, | Quote of the week: Too long to include Sun Microsystems Inc. | here - read "Being an American" by Internet: geoff@East.Sun.COM | Theodore A.Kaldis, Disclaimer: Obviously.... | in talk.politics.misc. Quite amazing stuff!