LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-29-2005, 07:18 AM   #1
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Rep: Reputation: 32
Samba Printer Permissions Problem


Hi all,
My office is a windows shop. Our engineering group runs a Samba file & print server on a debian 3.0 box. This machine has run almost non-stop for about 4 years now. We have recently started having problems the printing function. We can see the shares and printer just fine from windows. When viewing the physical printer it says "lp on gcnpd Access denied, unable to connect". We get this as well for some virtual printers that are PDF generators.

I look in /var/spool/samba/log.smdb and see lots of entries like:
Code:
...
[2005/07/28 05:53:57, 0] tdb/tdbutil.c:tdb_log(725)
  tdb(/var/cache/samba/printing/lp.tdb): rec_free_read bad magic 0x42424242 at offset=757908
[2005/07/28 05:53:57, 0] tdb/tdbutil.c:tdb_log(725)
  tdb(/var/cache/samba/printing/lp.tdb): rec_read bad magic 0x0 at offset=28964
[2005/07/28 19:29:21, 0] lib/util_sock.c:get_peer_addr(1150)
  getpeername failed. Error was Transport endpoint is not connected
[2005/07/28 19:45:01, 0] tdb/tdbutil.c:tdb_log(725)
  tdb(/var/cache/samba/printing/lp.tdb): rec_free_read bad magic 0x42424242 at offset=757908
[2005/07/28 19:45:01, 0] tdb/tdbutil.c:tdb_log(725)
  tdb(/var/cache/samba/printing/lp.tdb): rec_read bad magic 0x0 at offset=28964
...
If I view my specific log entry I see:
Code:
gcnpd:/var/log/samba# cat log.172.22.0.248
[2005/07/06 14:00:47, 0] smbd/nttrans.c:call_nt_transact_ioctl(2317)
  call_nt_transact_ioctl(0x9009c): Currently not implemented.
[2005/07/18 02:34:03, 0] tdb/tdbutil.c:tdb_log(725)
  tdb(/var/cache/samba/printing/lp.tdb): rec_free_read bad magic 0x42424242 at offset=757908
[2005/07/18 02:34:08, 0] tdb/tdbutil.c:tdb_log(725)
  tdb(/var/cache/samba/printing/lp.tdb): rec_free_read bad magic 0x42424242 at offset=757908
I am assuming that "bad magic" is not a good thing. Any ideas where to look?

BTW... /var/spool/samba has 777 permissions.

Thanks in advance for any help...

Chris
 
Old 01-07-2007, 01:10 PM   #2
watlings
LQ Newbie
 
Registered: Aug 2006
Location: Chicago, IL
Distribution: Ubuntu Dapper Drake
Posts: 1

Rep: Reputation: 0
Fixed!!!

I had a similar problem. Setup:

1 Samba server (Ubuntu 6.06) hosting a Brother HL5150D via samba
1 Linux client (Ubuntu 6.10) printing to Brother HL5150D via samba
1 Windows client (2000 Pro) printing to Brother HL5150D via samba
1 Windows client (XP Home) printing to Brother HL5150D via samba
1 Mac client (OS X 10.4.8) printing to Brother HL5150D via samba

One day, printing from the two windows clients, and the linux client stopped working. Printing via the Mac client (using samba) and the server (local printing) still worked. I futzed around with this issue for months (it's my home network, and I had a workaround.. so it wasn't a hot issue for me) before I found the problem and solution. Looking in the samba log for my linux and windows clients, and found this error message:

[2007/01/07 12:03:13, 1] smbd/service.c:make_connection_snum(693)
HOSTNAME (10.0.0.20) connect to service HL-5150D initially as user USER (uid=1000, gid=1000) (
pid 6034)
[2007/01/07 12:03:13, 0] tdb/tdbutil.c:tdb_log(772)
tdb(/var/cache/samba/printing/HL-5150D.tdb): rec_free_read bad magic 0x42424242 at offset=29516

The first entry showed it wasn't an authentication issue, and the second entry showed it was an error with a particular TDB file. A little poking around on the net told me I should just be able to delete the offending TDB file (in my case, /var/cache/samba/printing/HL-5150D.tdb), and samba would recreate it. I did this, stopped and restarted samba (sudo ./samba restart in /etc/init.d/samba) and suddenly printing via samba from all of my clients worked again. Just thought I would share.
 
Old 07-14-2011, 03:59 AM   #3
kiscsibe33
LQ Newbie
 
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by watlings View Post
The first entry showed it wasn't an authentication issue, and the second entry showed it was an error with a particular TDB file. A little poking around on the net told me I should just be able to delete the offending TDB file (in my case, /var/cache/samba/printing/HL-5150D.tdb), and samba would recreate it. I did this, stopped and restarted samba (sudo ./samba restart in /etc/init.d/samba) and suddenly printing via samba from all of my clients worked again. Just thought I would share.
Hi!

I know this is a 4 years old post, but it helped me to solve my similar problem, not just similar but the same problem.

So, thanks that you shared this.

My problem was: 2 Star 300 printers worked fine with a samba server, witch installed in 2002. Yes, you see well.
And about one year ago one of them stopped, but the other one stopped last week. And there was no usable printer finally.

I put out the serves winchester, and put in another pc, and browsed in its folder.
And I found in log files similar error messages.


After all I found your reply, and thanks this my problem solved too.

Thanks!
(and sorry about my english)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba problem - no permissions Seventh Linux - Software 5 11-08-2005 05:05 AM
file permissions not being remembered for SAMBA printer files/directories Avatar Linux - General 0 08-30-2005 01:44 PM
Samba Permissions Problem Stormblade Linux - Software 1 11-12-2004 07:09 AM
Samba Permissions Problem gigglesnorter Linux - Software 0 05-24-2004 04:37 AM
Add Samba printer to OpenOffice; CUPS permissions change after reboot bax Linux - Software 4 01-19-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration