torstenn created page: print via samba authored by Torsten Nielsen's avatar Torsten Nielsen
......@@ -41,4 +41,57 @@ Now you can print using the script like this:
$ mylpr 5123-300-c-2 golfer.ps
```
##
\ No newline at end of file
## Method 2 - Add a printer to CUPS
This method requires a running version of CUPS on a personal computer,
where you alone have root access.
Insert the following entry into `/etc/cups/printers.conf`for the printer `5123-300-c-2`:
```
<Printer 5123-300-c-2>
Info
Location 5123-300
MakeModel
DeviceURI smb://<username>:<password>@uni/print.uni.au.dk:139/5123-300-c-2
State Idle
StateTime 1479952801
Type 8400916
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>
```
Remember to put the correct values for `<username>:<password>`!
Reload the CUPS configuration using the command:
```
# sudo systemctl reload cups
```
Take care that no one but you have access to the `printers.conf`file,
so your login-credentials won't be exposed.
PPD files describe the capabilities of the printer to CUPS so if you want
to use any fancy features it's best to have a good PPD-file configured.
The PPD files goes in the folder: `/etc/cups/ppd`. If the of the PPD file is
`xrx720.ppd`, then create a link like this:
```
# cd /etc/cups/ppd
# ln -s ./xrx7120.ppd 5123-300-c-2.ppd
```
The same physical PPD file can be linked to from as many printers as required.
There are other ways to create printers and link a PPD file:
* Web-interface `http://localhost:631`
* GUI-interface