System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

HP-UX 11i v1 - NIS+ printers.org_dir?

mvpel
Trusted Contributor

HP-UX 11i v1 - NIS+ printers.org_dir?

I'm beginning the investigation of an overhaul of our printing environment here, and I'm having a bit of trouble getting a foothold in our HP systems, so I'm hoping someone can offer some guidance.

I can't find any documentation so far that indicates whether HP-UX accepts the "printers" entry in the nsswitch.conf file like our Sun systems do, or if it queries printers.org_dir - a "tusc" of the lpstat command shows it inquiring with nsswitch.conf, so it seems like it may, but if anyone can point me to something definitive about setting up printers in an NIS+ database, I'd appreciate it.

Thanks!
6 REPLIES
Dennis Handly
Acclaimed Contributor

Re: HP-UX 11i v1 - NIS+ printers.org_dir?

Not sure if this is the same as yours but my NIS has a printers map that just has a list of remote printers.
There is a script that will add these printers to each system in the lab, through lpadmin(1m).
mvpel
Trusted Contributor

Re: HP-UX 11i v1 - NIS+ printers.org_dir?

So you're just using the NIS map as a reference to build the local machine's printing database, is that correct?
mvpel
Trusted Contributor

Re: HP-UX 11i v1 - NIS+ printers.org_dir?

No wonder I'm confused. The Solaris FAQ documentation about the printers.org_dir table is flat out FALSE.

I got my first clue when I traced an lpstat command through Ethereal to our HP NIS+ server, and saw it asking for a column named "key" rather than "printer_name" as found in the FAQ.

Then I sifted through OpenSolaris source code for the lpset command, which is capable of creating the NIS+ printers.org_dir table if it doesn't exist, and found that the only two columns in the printers.org_dir table are called "key" and "datum."

The "key" appears to be the name of the printer, and the "datum" column is the full colon-delimited line from printers.conf.

Still not quite clear yet whether HP-UX can use printers.org_dir, but at least I'm making some headway.
OldSchool
Honored Contributor

Re: HP-UX 11i v1 - NIS+ printers.org_dir?

"No wonder I'm confused. The Solaris FAQ documentation about the printers.org_dir table is flat out FALSE."

Well...it might apply correctly to Solaris, but I wouldn't know.
mvpel
Trusted Contributor

Re: HP-UX 11i v1 - NIS+ printers.org_dir?

Nope, according to the source code and the behavior of my Sun machines here, it definitely does not apply correctly even to Solaris.

I'll be curious to find out why HP-UX lpstat is checking the nsswitch.conf file, according to tusc, when that's not documented in nsswitch.conf(4).
Dennis Handly
Acclaimed Contributor

Re: HP-UX 11i v1 - NIS+ printers.org_dir?

>So you're just using the NIS map as a reference to build the local machine's printing database, is that correct?

Exactly. It just does "ypcat -k printers" and there is a printer name (key) and data.