如何在 Linux 中设置帐户和密码以使用网络打印机

Lag*_*nge 5 networking linux printer passwords

我在笔记本电脑上同时使用 Linux Mint 和 Windows 7。

我可以在 Windows 7 中完美地使用我办公区的网络打印机,它似乎使用 LPR 协议,需要我的 ID 和密码。

当我使用 Linux 时,问题就来了。我使用 CUPS 设置了网络打印机,但找不到任何地方可以设置我的打印服务 ID 和密码。事实证明,我可以成功地将要打印的文件发送到打印机(在 CUPS 状态中指示),而打印机却只提示错误。

下面是win7和linux下打印机的设置:

赢7:

赢7 1

另一个网址:

赢7 2

Linux:

linux 1

我试过了id@"printer address",但似乎无法保存此设置("printer address"按“应用”后,设备 URI 会恢复。)

这是@slm 发现的解决方案:

查看这个 ubuntu 问题,bugs.launchpad.net/ubuntu/+bug/124442,转到 #8 评论,他展示了一种提供我认为您需要 lpd 的信息的方法。– slm 1 小时前

slm*_*slm 2

system-config-printer您可以从终端运行该应用程序吗?如果是这样,它会像这样出现:

           打印对话框

单击“添加”按钮将弹出此对话框。注意”很可能会提示您至少输入 root 密码一次或两次。

       新打印机对话框

通过 SAMBA选择Windows 打印机。

      新的 Samba 打印机对话框

编辑#1

与@Lagrange讨论后确定他拥有以下富士施乐打印机“FX DocuCentre-II C7500 PS”。在 Ubuntu 问题跟踪器上找到了以下页面。

用于 CUPS 的富士施乐发动机

该线程的#8 评论包含了解决方案。我将其摘录如下,以便这个问题/答案可以独立存在。

Hi,

based on the above comments, I've made some .deb packages:

1) original source code from ftp://download.fujixerox.co.jp/pub/exe/apeosport/c4300series/fxlinuxprint-src-1.0.1.tar.gz, licensed under GNU GPLv2
2) get the driver to output the required headers for printing to printers with mandatory auditing (FXUserName setting)

Also:
3) fixed a slight problem with the PPD file that meant the printer wasn't visible in the GUI "add printer" dialogs
4) tried to fix up some potential insecure uses of strcat() function.

.deb packages and my changes to the source code are available at http://www.wlug.org.nz/~jrm/fxlinuxprint/

To set the FXUserName variable for auditing, do one of:

a) [GNOME]
  click on System -> Administration -> Printing
  right-click on the printer, go to Properties, go to Job Options.
  At the bottom, enter "FXUserName" (case-sensitive) into the "add a new option" box, and click Add. Then set the value to the correct printer accounting code.

b) [command line, requires root permissions]
  stop the printing service (CUPS) with '/etc/init.d/cups stop'
   edit /etc/cups/printers.conf, and inside the <Printer> or <DefaultPrinter> blocks, add a new line like 'Option FXUserName 123456'.
  Now restart the printing service with '/etc/init.d/cups start'.

c) (change setting for local user only)
  From the command line, enter "lpoptions -p (printername) FXUserName=123456",
  replacing "123456" with the correct printer accounting code for your department. You can find the printername for the already known printers with 'lpstat -a'
  Note! some applications that don't fully support the CUPS printing system
  (such as Open Office) will not correctly apply the option if it's set using this method.
  http://user.services.openoffice.org/en/forum/viewtopic.php?f=16&t=36474

@ryanau - I couldn't find any way to get the CUPS interface to allow a text entry dialog like that (except for adding your own option like in step a) above). I think the PPD interface only allows "PickOne"-style options.
Run Code Online (Sandbox Code Playgroud)