LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2004, 01:56 PM   #1
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Rep: Reputation: 30
Samba Printer Sharing Problem


I'm trying to share a CUPS HP DeskJet 840C on a Slackware computer with my Windows XP Laptop. It works from Slackware, but when I try to add a printer, windows sees my linux computer, but doesn't see any printers. Here is my /etc/samba/smb.conf:
Code:
[global]
workgroup = WESTMINSTER
netbios name = AYRO
hosts allow = 192.168. 127.
guest account = pcguest
security = user
printing = cups
printcap name = lpstat

[public]
path = /share
public = yes
writeable = yes
create mask = 0777
browseable = yes

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = yes
writeable = no
printable = yes
create mode = 0700
print command = lpr -P %p -o raw %s -r
lpq command = lpstat -o %p
lprm command = cancel %p-$j
WESTMINSTER is the domain my laptop was set to (the one I use at school). No other computers in my house use that domain. In case it is important, and to prove everything is working, here is my lpstat -t:
Code:
drigz@ayro:/mnt$ lpstat -t
scheduler is running
system default destination: HPDeskJet840C
device for HPDeskJet840C: parallel:/dev/lp0
HPDeskJet840C accepting requests since Jan 01 00:00
printer HPDeskJet840C is idle.  enabled since Jan 01 00:00
Why can't windows see it?
 
Old 09-09-2004, 02:11 PM   #2
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
It seems, browseable option is set= 'no'.

You may want to set as 'Yes'. see below..

[printers]
comment = All Printers
path = /var/spool/samba
browseable = Yes
guest ok = yes
writeable = no
printable = yes
create mode = 0700
print command = lpr -P %p -o raw %s -r
lpq command = lpstat -o %p
lprm command = cancel %p-$j

now, check on windows PC.

hope this helps.

--Hitesh
 
Old 09-09-2004, 02:16 PM   #3
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
nope does it matter than smbd doesn't run - whenever i run /etc/rc.d/rc.samba restart, it says smbd: no process killed, and if i run /usr/sbin/smbd -D from the command line, it ends immediately (no output) and only nmbd is in ps ax. here is the relevant part of /var/log/samba/log.smbd:
Code:
[2004/09/09 19:11:27, 0] smbd/server.c:main(757)
  smbd version 3.0.4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2004/09/09 19:11:27, 0] printing/pcap.c:pcap_printer_fn(361)
  Unable to open printcap file lpstat for read!
[2004/09/09 19:11:27, 0] lib/util_sock.c:open_socket_in(691)
  bind failed on port 139 socket_addr = 0.0.0.0.
  Error = Address already in use
looks bad - what can i do about it?

also, if I try and open my linux computer from my network places on my laptop, i get:
Code:
\\Ayro is not accessible. You might not have permission to use this 
network resource. Contact the administator of the server to find out if 
you have access permissions.

The network path was not found.
Well, i've contacted myself, and i seem thoroughly confused about the whole matter

Last edited by drigz; 09-09-2004 at 02:21 PM.
 
Old 09-09-2004, 03:27 PM   #4
kryo_king
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
It looks as though samba cannot bind to a local interface!

In your smb.conf in the global section add
interfaces = (ip address of server)/24

the /24 is for a class c network which in general 192.168 should be!

If you ps -ef | gep smbd do you get any reference to samba?

If your win box isnt allowed access you may need to add a nix user and a samba user smbpasswd -a (windows username) to the system.

run testparm smb.conf which should check your smb.conf for errors! (does on RH/mandrake)

Hope this helps!
 
Old 09-09-2004, 04:19 PM   #5
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
when you say ip address of server, which machine do you mean? my windows laptop is 192.168.123.104 and my linux computer is 192.168.123.102 (although these are dynamic, and so occasionally change).

there is no smbd in ps' output.

can you explain in more detail how i would go about adding these users?

testparm reports no errors

Last edited by drigz; 09-09-2004 at 04:22 PM.
 
Old 09-09-2004, 04:49 PM   #6
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
after a little googling (i guess i forgot...) i've found out that it's the vmware samba daemon stopping me from running samba - its that that's sitting on port 139...
 
Old 09-09-2004, 05:27 PM   #7
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
progress! uninstalled and reinstalled (but without samba) vmware, and now the client runs...

ive been looking into the users problem, which i think is it. apparently i need to create a user on my linux box with the same name as the user on my laptop. however, i cant do this, because my windows user is 'rodrigo.queiro' and linux doesnt like dots in usernames...
 
Old 09-10-2004, 12:59 AM   #8
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
did you try with webmin? it's have grahpical interface though which you can manage all services. it's easy to use.

just visit the link at http://www.webmin.com

Also, if you have installed SWAT on the system. just type this URL (http://localhost:901/ ) into web browser and configure the complex smb.conf(5) file via a Web browser
[SWAT - Samba Web Administration Tool ]

Hope this helps.

--Hitesh
 
Old 09-10-2004, 02:18 PM   #9
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
ok, by adding the linux user samba, and then adding htat user to hte laptop, and using hte samba passwords, i now can see the printer from windows. however, it says i cant connect to it, access is denied. ideally, i wouldnt have to login and logout to do this...
 
Old 09-10-2004, 02:33 PM   #10
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Original Poster
Rep: Reputation: 30
ok, im basically back where i was before - the samba windows user can see my shares (printer and file) (although the computer doesn't appear in my workgroup - i have to go to \\192.168.123.102 to see them) but whenever i try to do something, it says access denied. here is my current smb.conf:
Code:
[global]
   workgroup = WESTMINSTER
   netbios name = AYRO
   server string = Samba Printer Server
   hosts allow = 192.168. 127.
   guest account = pcguest
   log file = /var/log/samba/log.%m
   max log size = 50
   security = user
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   interfaces = 192.168.1.1/24
   printcap name = lpstat
   printing = cups
   
[homeshare]
   path = /home/drigz
   public = yes
   browseable = yes
   
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = yes
   writable = no
   printable = yes
   create mode = 0700
   print command = lpr -P %p -o raw %s -r
   lpq command = lpstat -o %p
   lprm command = cancel %p-%j
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Sharing a printer using samba kponenation Fedora 1 11-15-2005 09:14 PM
Samba and printer sharing onelung02 Linux - Software 2 02-28-2005 02:50 PM
Samba Printer Sharing Problem jaraju Linux - Networking 4 02-03-2005 01:40 AM
samba printer sharing nithin_bhaskar Linux - Networking 1 06-17-2004 06:17 PM
problem with samba printer sharing on red hat 8.0 jaitropfaim Linux - Networking 1 02-16-2003 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:13 AM.

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