LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba Printer Sharing Problem (https://www.linuxquestions.org/questions/linux-software-2/samba-printer-sharing-problem-228635/)

drigz 09-09-2004 12:56 PM

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?

hitesh_linux 09-09-2004 01:11 PM

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

drigz 09-09-2004 01:16 PM

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 :)

kryo_king 09-09-2004 02:27 PM

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!

drigz 09-09-2004 03:19 PM

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

drigz 09-09-2004 03:49 PM

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...

drigz 09-09-2004 04:27 PM

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...

hitesh_linux 09-09-2004 11:59 PM

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

drigz 09-10-2004 01:18 PM

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...

drigz 09-10-2004 01:33 PM

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



All times are GMT -5. The time now is 12:29 AM.