P. 1
Samba

Samba

|Views: 167|Likes:
Publicado porNurul Istiqomah

More info:

Published by: Nurul Istiqomah on Dec 14, 2010
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/21/2014

pdf

text

original

A byte stream can be printed to a remote printer using smbclient. A text file can be
printed as shown in the following example:

$ smbclient ‘//wincli/localiii’ -c “print test.txt”

In the preceding example,the printer must be manually form-fed unless the file

test.txtends with a formfeed character. Also,the print job stair-steps,meaning that
each new line starts to the right of the end of the previous line. This can be fixed with
CRLF<-->CR translation,as done in the following command.

$ smbclient ‘//wincli/localiii’ -c “translate; print test.txt”

The following is a quick way to formfeed the printer:

$ echo ^L | smbclient ‘//wincli/localiii’ -c “print -”

Samba Client Utilities

CHAPTER12

361

12

S

A
M
B
A

C

L
I
E
N
T

U

T
I
L
I
T
I
E
S

Note

The customary way to back up a share using taris to use the smbtarutility,
which is covered in the “Using nmblookupfor Diagnostic Testing” section later
in this chapter.

Note

The ^Lin the preceding command is the formfeed character (Ctrl+L), produced
in UNIX by the Ctrl+V Ctrl+L keyboard sequence.

The following command prints whatever you type to the remote printer:

$ cat | smbclient ‘//wincli/localiii’ -c “translate; print -”

Note that to end the typing session,you press the Ctrl+D end-of-file keyboard
combination.

15 8628 CH12 3/17/00 12:54 PM Page 361

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->