I want to connect to a Windows Network printer over the smb protocol. It works wenn I add the username and password in clear text in the connection string, but this would be a huge security risk.
Anyone know how to add the user & pw in more secure way?
# configuration.nix
services.printing = {
enable = true;
drivers = with pkgs; [ hplip ];
};
hardware.printers.ensureDefaultPrinter = "printername";
hardware.printers.ensurePrinters = [{
name = "printername";
# would work if adding user&pw here (at least it works when done so directly in CUPS
# e.g. "smb://user:pw@print-server.com/printer"
deviceUri = "smb://print-server.com/printer";
model = "HP/hp-color_laserjet_mfp_m577-ps.ppd.gz";
ppdOptions = {
Duplex = "DuplexNoTumble";
PageSize = "A4";
# This worked in a old config, but not anymore (CUPS will not promt)
auth-info-required = "username,password";
};
}];
services.samba.enable = true;