torstenn created page: print via samba authored by Torsten Nielsen's avatar Torsten Nielsen
# Print from Linux to the UNI Print Server using Samba
## Method 1 - Print a PS file using CLI
Samba version 3.6.23 or higher!
```
$ smbclient //prt01.uni.au.dk/5123-300-c-2 - U au12345 -W uni -c "print golfer.ps"
Enter au12345's password:
```
In case you log on to Kerberos with the command:
```
$ kinit au12345@UNI.AU.DK
Password for au12345@UNI.AU.DK
```
You can avoid further validation by using the option '-k':
```
$ smbclient //prt01.uni.au.dk/5123-300-c-2 -k -c "print golfer.ps"
```
In order to simplify the print command, you may create the shell script below
and put it somewhere in your PATH with the name 'mylpr':
```
#!/bin/sh
/usr/bin/smbclient //prt01.uni.au.dk/$1 - U au12345 -W uni -c "print $2"
exit 0
```
The script must be given execute permission:
```
$ chmod +x mylpr
```
Now you can print using the script like this:
```
$ mylpr 5123-300-c-2 golfer.ps
```
##
\ No newline at end of file