cancel
Showing results for 
Search instead for 
Did you mean: 

smbprint on 11.31

 
SOLVED
Go to solution
Occasional Visitor

smbprint on 11.31

Hi All,

We are in the process of moving content and applications from an old 11.11 box to a new 11.31 and have setup printing on the new box using hppi and can test print fine except for one queue on the old box that uses the smbprint script.  We are having trouble getting that to work on the new box, it sends the document to the printer but without any content.

if i disable the printer & send a test with 

echo testing | lp -d nzgtsmbx

i can open the /var/spool/lp/request/nzgtsmbx directory and see the cA... and dA... files there with content in them, but when i enable the printer and the files are sent to the remote smb print share they arrive but are empty.

All we can think of at this stage is that our samba, and maybe OS,  versions aren't compatible with the smbprint script?

Looking at the samba install i see on the old box we have a package with library files as well as the server:

# CIFS-Server                           A.02.03        HP CIFS Server (Samba) File and Print Services
  CIFS-Server.CIFS-DOC                  A.02.03        Samba Documentation (original)
  CIFS-Server.CIFS-LIB                  A.02.03        Libraries for CIFS Server based on Samba3

the new server has a later version but the lib package is not listed - is this normal? 

# CIFS-Server                           B.04.09.00.00  HPE CIFS Server (Samba) File and Print Services
  CIFS-Server.CIFS-DOC                  B.04.09.00.00  Samba Documentation (original)

I'm wondering if I need to somehow get the CFS-LIB files on there?

Any suggestions would be appreciated

Thanks

3 REPLIES 3
HPE Pro

Re: smbprint on 11.31

for bascially it depends on what security level you are using. whether it is "share level security or server level security". the only supported level of security is "user", "ADS", "Domain"

The lates Veriosn of CIFS is 04.12.03.00. However the library files are available in the mentioeed package ofr 04.09.00.00 hence seperate fileste is not required to be installed ofr the libraries. at the 02.03 version Libraries where built after the CIFS veriosn was released hence the library product had to be add to the bundle additionally.

There should be options which can be used to correct the print issue in samba (CIFS). check the man pages of configuration file, man pages for command syntax switches and the also check the /etc/opt/samba/smb.conf and do the needful


I am a HPE Employee

Accept or Kudo

Occasional Visitor

Re: smbprint on 11.31

thanks for your reply and clearing up the library file question.

We have "user" defined in smb.conf, although "share" is used on the old system, so thats one difference.

we thought it might be a protocol mismatch but we've tried -m NT1, -m SMB2, -m SMB3 to no avail in this part of the interface script

 

(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
    echo translate
	echo "print -"
	echo "@PJL SET USERNAME=\"$iuser\""
	cat $*
) | /opt/samba/bin/smbclient -m NT1 -U $user "\\\\$server\\$lservice" $password > /dev/null
exit $?

 

the other thing is printing the document promina.txt with this cmd works:

 

lp -d nzgtsmbx promina.txt

 

but using echo like this reproduces the issue where a blank document is printed:

 

echo testing | lp -d nzgtsmbx

 

I've checked the man samba page  & man smbclient pages & enabled debugging. 

 

/opt/samba/bin/smbclient -l /tmp -d 10 -U $user "\\\\$server\\$lservice" $password > /dev/null

 

the debug log is created but even with it set to level 10 it is blank - so not getting written to.

...still scratching our heads about this one...

 

Occasional Visitor
Solution

Re: smbprint on 11.31

We got this sorted in the end, Saajan_d you were correct, we had to change the code like this:

(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
    #echo translate
	#echo "print -"
	echo "@PJL SET USERNAME=\"$iuser\""
	cat $*
) | /opt/samba/bin/smbclient -U $user "\\\\$server\\$lservice" $password -c "translate;print -" > /dev/null
exit $?

moving the commands "translate" and "print -" into the smbclient line using the -c switch

Cool