{"id":311,"date":"2007-09-30T15:59:58","date_gmt":"2007-09-30T20:59:58","guid":{"rendered":"http:\/\/192.168.33.66\/wp\/?p=311"},"modified":"2007-09-30T15:59:58","modified_gmt":"2007-09-30T20:59:58","slug":"smb-samba-config-errors","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=311","title":{"rendered":"smb samba config errors"},"content":{"rendered":"<p>Your smb.conf looks to have no errors. I see it was created with SWAT,<br \/>\nwhich usually sets things up without a hitch. Out of curiosity, why<br \/>\ndid you pick &#8220;security=SHARE&#8221;?<br \/>\nThere are a few lines I have in mine that I don&#8217;t see in yours (I<br \/>\nwill paste the relevant bits of mine at the end of the e-mail):<br \/>\n[global]<br \/>\n<!--more--><\/p>\n<p>Your smb.conf looks to have no errors. I see it was created with SWAT,<br \/>\nwhich usually sets things up without a hitch. Out of curiosity, why<br \/>\ndid you pick &#8220;security=SHARE&#8221;?<br \/>\nThere are a few lines I have in mine that I don&#8217;t see in yours (I<br \/>\nwill paste the relevant bits of mine at the end of the e-mail):<br \/>\n[global]<br \/>\nprintcap name= lpstat<br \/>\nprintcap name = lpstat<br \/>\nprinting = cups (or BSD or whatever)<\/p>\n<p>[HP] (mine is called [printers] )<br \/>\npath = \/var\/spool\/samba (make sure this directory is chmod 1777)<\/p>\n<p>Question: You have your printer share named [HP] &#8211; is this the name of<br \/>\nyour print queue and has this changed between working \/ not working?<br \/>\nYou might add &#8220;read only = no&#8221; in there.<\/p>\n<p>The first thing I would suggest is to go to the Unofficial Samba Howto<br \/>\nhere: http:\/\/dennis_caparas.tripod.com\/samba_test.html<br \/>\n(There are other copies of it around the web, if you search for &#8220;Samba<br \/>\nHowto&#8221;) Follow all the tests in order, and see what you come up with.<br \/>\nThis will diagnose most Samba problems (and has worked well for me in<br \/>\nthe past).<\/p>\n<p>I forget if this is in the tests above, but make sure that the user on<br \/>\nthe Windows box has a valid samba user account and that the passwords<br \/>\nmatch.<\/p>\n<p>If these fail you, and they failed me last week, there are tests in a<br \/>\nbook called Samba Unleased published by SAMS, written by Steve Litt,<br \/>\net. al. I haven&#8217;t gotten through all of it yet, I just purchased it<br \/>\nyesterday. The chapter on troubleshooting printer problems is<br \/>\nexcellent. It approches things from a modular perspective to narrow<br \/>\ndown the cause of the problem &#038; point of failure. I was able to<br \/>\ndiagnose &#038; fix my printing problem in about an hour with this book,<br \/>\nwhere before I had tried the above link &#038; Googled to no avail. My<br \/>\nproblem turned out to be samba not using the cups print system I had<br \/>\nsetup, and that the \/etc\/printcap file was missing ONE line. (blah,<br \/>\nRedhat 7.3 auto print configure borks the day). The Windows box<br \/>\nactually sent stuff to the printer (which started up like it was going<br \/>\nto print and then stop).<\/p>\n<p>Here are some tests to run that are quick if the Samba Howto doesn&#8217;t<br \/>\nwork out. They are taken from &#8220;Samba Unleased&#8221; and my own experience.<\/p>\n<p>&#8211; Run testparm on smb.conf and fix any errors<br \/>\n&#8211; Test connectivity between the two boxes by doing a ping from the<br \/>\nLinux box to the Windows box &#038; vica versa<br \/>\n&#8211; Test DNS name resolution between the two boxes by pinging the name<br \/>\nof the Linux box from the Windows box &#038; vica versa. Problems should be<br \/>\ncorrected by entries in the hosts file.<br \/>\n&#8211; Test to see if you can get share names from the Linux box with<br \/>\n  smbclient -NL servername<br \/>\n  Do this first from the Linux box on itself &#038; then from the Windows<br \/>\nbox.<br \/>\n&#8211; From the windows client type<br \/>\n   echo Hello^L > \\\\servername\\printqueuename<br \/>\n(I had to press the paper feed button on the printer for it to print<br \/>\nout)  If this succeeds it rules out everything but the Windows printer<br \/>\ndefinition and application you are trying to print from. If this<br \/>\nsucceeds, try printing a test page from the properties of the printer<br \/>\nin Windows.<br \/>\n&#8211; Try printing a short text only file via smbclient with:<br \/>\n   smbclient &#8216;\/\/servername\/printsharename&#8217; -U userid, put dos.txt<br \/>\n  This rules out samba if successful as the problem.If this succeeds<br \/>\nbut the Hello test above fails, a connectivity or name resolution<br \/>\nproblem is the most likely scenario. If this fails, the job is getting<br \/>\nlost in samba, do next test.<br \/>\n&#8211; From the Linux box (even tho it&#8217;s working) try: <br \/>\necho ^MHello^L | lpr -P printqueuename<br \/>\n(I had to press the paper feed button on the printer for it to print<br \/>\nout). If it fails, there is a print queue, print device or hardware<br \/>\nproblem.<\/p>\n<p>This ought to keep you busy for a while \ud83d\ude09 If this fails, let me know<br \/>\nwhat your test results were and we&#8217;ll see what we can do from there.<br \/>\n(BTW, it feels good to be able to give back support into the groups<br \/>\nthat have given a lot to me).<\/p>\n<p>&#8212; <br \/>\nI hope this is helpful \ud83d\ude42<br \/>\nTracey<br \/>\nLinux Counter #264789<\/p>\n<p>smb.conf<br \/>\n[global]<br \/>\n\tlog file = \/var\/log\/samba\/log.%m<br \/>\n\tload printers = yes<br \/>\n\tsmb passwd file = \/etc\/samba\/private\/smbpasswd<br \/>\n\tname resolve order = lmhosts bcast wins<br \/>\n\tsocket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192<br \/>\n\tremote browse sync = 192.168.123.255<br \/>\n\thosts allow = 192.168.123.0\/24 127.<br \/>\n\tencrypt passwords = yes<br \/>\n\tpasswd program = \/usr\/bin\/passwd %u<br \/>\n\tdns proxy = no <br \/>\n\tnetbios name = localhost<br \/>\n\tnetbios aliases = localhost<br \/>\n\tprinting = cups<br \/>\n\tserver string = Selar Samba Server<br \/>\n\tdefault = fileshare<br \/>\n\tunix password sync = Yes<br \/>\n\tremote announce = 192.168.123.255\/mydomain.org<br \/>\n\tworkgroup = mydomain.org<br \/>\n\tlogon path = \\\\%L\\Profiles\\%U<br \/>\n\tos level = 20<br \/>\n\tadd user script = \/usr\/sbin\/useradd -s \/bin\/false %u<br \/>\n\tprintcap name = lpstat<br \/>\n\tsecurity = user<br \/>\n\tmax log size = 50<br \/>\n\tdomain admin group = root @wheel<\/p>\n<p>\n# Un-comment the following to provide a specific roving profile share<br \/>\n# the default is to use the user&#8217;s home directory<br \/>\n[Profiles]<br \/>\n    path = \/var\/lib\/samba\/profiles<br \/>\n    browseable = no<br \/>\n    guest ok = yes<\/p>\n<p># NOTE: If you have a CUPS print system there is no need to <br \/>\n# specifically define each individual printer.<br \/>\n# You must configure the samba printers with the appropriate Windows<br \/>\n# drivers on your Windows clients. On the Samba server no filtering is<br \/>\n# done. If you wish that the server provides the driver and the<br \/>\nclients# send PostScript (&#8220;Generic PostScript Printer&#8221; under Windows),<br \/>\nyou have# to swap the &#8216;print command&#8217; line below with the commented<br \/>\none.<br \/>\n[printers]<br \/>\n   comment = All Printers<br \/>\n   path = \/var\/spool\/samba<br \/>\n   browseable = yes<br \/>\n# to allow user &#8216;guest account&#8217; to print.<br \/>\n   guest ok = yes<br \/>\n   writable = yes<br \/>\n   printable = yes<br \/>\n   create mode = 0700<br \/>\n# =====================================<br \/>\n# print command: see above for details.<br \/>\n# =====================================<br \/>\n;  print command = lpr -P %p -o raw %s -r   # using client side<br \/>\nprinter drivers.   print command = lpr -P %p %s # using cups own<br \/>\ndrivers (use generic PostScript on clients).<br \/>\n# The following two commands are the samba defaults for printing=cups<br \/>\n#change them only if you need different options: <br \/>\n lpq command = lpq -P%p  <br \/>\n lprm command = cancel %p-%j<\/p>\n<p># This share is used for Windows NT-style point-and-print support.<br \/>\n# To be able to install drivers, you need to be either root, or listed<br \/>\n# in the printer admin parameter above. Note that you also need write<br \/>\naccess# to the directory and share definition to be able to upload the<br \/>\ndrivers.# For more information on this, please see the Printing<br \/>\nSupport Section of<br \/>\n#\/usr\/share\/doc\/samba-<version>\/docs\/Samba-HOWTO-Collection.pdf<br \/>\n[print$]\twriteable = yes<br \/>\n\tpath = \/var\/lib\/samba\/printers<br \/>\n\twrite list = @adm, at root<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8211; next part &#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nA non-text attachment was scrubbed&#8230;<br \/>\nName: not available<br \/>\nType: application\/pgp-signature<br \/>\nSize: 189 bytes<br \/>\nDesc: not available<br \/>\nUrl : http:\/\/linuxchix.org\/pipermail\/techtalk\/attachments\/20030318\/a99cd95e\/attachment.pgp<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your smb.conf looks to have no errors. I see it was created with SWAT, which usually sets things up without a hitch. Out of curiosity, why did you pick &#8220;security=SHARE&#8221;? There are a few lines I have in mine that &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=311\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311"}],"version-history":[{"count":0,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}