• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

CUPS SAMBA und HPLIP unter SUSE 11.2

VN-Andy

Member
Folgendes Problem:

Auf meinem Rechner ist SUSE 11.2 am laufen. Habe mir dann mit YAST zwei Drucker installiert, HP Laserjet 1320 (über HPLIP) und Epson Stylus PRO 5000 (als Netzdrucker mit Gutenprint-Treiber). Von meinem System funktioniert das Drucken soweit OK. Jetzt habe ich mir einen SAMBA Server installiert, damit meine Frau von ihrem Windows XP Pro Rechner auch auf meine Drucker zugreifen kann. Ist auch recht nett für einen Datenaustausch. Der SAMBA Server wird beim Booten gestartet. Dabei werden aber die Drucker nicht veröffentlicht. Das funktioniert erst, wenn ich den SAMBA Server erneut mit 'sudo /etc/init.d/smb reload' lade.

Natürlich habe ich nach jeder Veränderung auch auf den Windowsrechnern einen Neustart durchgeführt, da sich Windows ja nur einmal einloggt.

Hier mal meine smb.conf:
Code:
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2008-08-28
[global]
workgroup = TUX-NET
printing = CUPS
printcap name = CUPS
cups options = raw
logon path = \\%25L\profiles\.msprofile
logon home = \\%25L\%25U\.9xprofile
logon drive = Z:
add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
domain master = no
usershare max shares = 100
netbios name = linux11
username map = /etc/samba/smbuser
passdb backend = smbpasswd
restrict anonymous = no

[homes]
comment = Home Directories
valid users = %S,%D%w%S
browseable = no
read only = no
inherit acls = yes

[transfer]
comment = Laptop backup
path = /home/andreas/transfer
valid users = andreas
read only = no
inherit acls = yes

[printers]
comment = All Printers
path = /var/tmp
printable = yes
create mask = 0600
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

Ich habe mich mal so durchs Internet gegoogelt und habe versucht als printcap name statt CUPS /etc/printcap zu benutzen. Dadurch werden zwar keine Fehler beim Samba boot mehr angezeigt, allerdings Drucker sehe ich trotz reload / restart nicht mehr.
Lasse ich den Eintrag auf CUPS, bekomme ich Fehlermeldungen (siehe unten). Drucker sehe ich auf den Windows Rechnern aber erst nach einem reload. Ich habe so den Eindruck, dass der Samba Server irgendwie zu früh gestartet wird.

Was gibt es noch für Fehler:

Hier z.B. ein Ausschnitt der /var/log/samba/log.smbd

Code:
[2009/11/30 21:07:43,  1] smbd/service.c:1047(make_connection_snum)
  aklafft (::ffff:192.168.178.20) connect to service andreas initially as user andreas (uid=1000, gid=100) (pid 12181)
[2009/11/30 21:07:51,  1] smbd/service.c:1047(make_connection_snum)
  aklafft (::ffff:192.168.178.20) connect to service transfer initially as user andreas (uid=1000, gid=100) (pid 12181)
[2009/11/30 21:07:56,  0] param/loadparm.c:8532(process_usershare_file)
  process_usershare_file: share name ::{2227a280-3aea-1069-a2de-08002b30309d} contains invalid characters (any of %<>*?|/\+=;:",)
[2009/11/30 21:07:56,  0] param/loadparm.c:8532(process_usershare_file)
  process_usershare_file: share name ::{2227a280-3aea-1069-a2de-08002b30309d} contains invalid characters (any of %<>*?|/\+=;:",)
[2009/11/30 21:07:56,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service ::{2227a280-3aea-1069-a2de-08002b30309d}
[2009/11/30 21:14:59,  1] smbd/service.c:1226(close_cnum)
  aklafft (::ffff:192.168.178.20) closed connection to service andreas
[2009/11/30 21:14:59,  1] smbd/service.c:1226(close_cnum)
  aklafft (::ffff:192.168.178.20) closed connection to service transfer
[2009/11/30 21:17:32,  0] param/loadparm.c:8532(process_usershare_file)
  process_usershare_file: share name ::{2227a280-3aea-1069-a2de-08002b30309d} contains invalid characters (any of %<>*?|/\+=;:",)
[2009/11/30 21:17:32,  0] param/loadparm.c:8532(process_usershare_file)
  process_usershare_file: share name ::{2227a280-3aea-1069-a2de-08002b30309d} contains invalid characters (any of %<>*?|/\+=;:",)
[2009/11/30 21:17:32,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service ::{2227a280-3aea-1069-a2de-08002b30309d}
[2009/11/30 21:33:05,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2009/11/30 21:33:20,  1] smbd/service.c:1047(make_connection_snum)
  aklafft (::ffff:192.168.178.20) connect to service andreas initially as user andreas (uid=1000, gid=100) (pid 12584)
[2009/11/30 21:39:50,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/home failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:39:50,  0] smbd/service.c:1188(make_connection)
  linux11 (::ffff:192.168.178.22) couldn't find service home
[2009/11/30 21:40:45,  1] smbd/service.c:1226(close_cnum)
  aklafft (::ffff:192.168.178.20) closed connection to service andreas
[2009/11/30 21:41:07,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:41:07,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:41:14,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:41:14,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:44:16,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:44:16,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:44:16,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:44:16,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:44:16,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service transfer
[2009/11/30 21:44:23,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:44:23,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:44:23,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:44:23,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:44:23,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service transfer
[2009/11/30 21:47:25,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:47:25,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Keine Berechtigung
[2009/11/30 21:47:25,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:47:25,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/transfer failed. Datei oder Verzeichnis nicht gefunden
[2009/11/30 21:48:33,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2009/11/30 21:50:19,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2009/11/30 21:55:48,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2009/11/30 21:57:17,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2009/11/30 22:04:32,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2009/11/30 22:06:04,  1] smbd/service.c:1047(make_connection_snum)
  aklafft (::ffff:192.168.178.20) connect to service hplaserjet1320series initially as user andreas (uid=1000, gid=100) (pid 12877)
[2009/11/30 22:06:15,  1] smbd/service.c:1226(close_cnum)
  aklafft (::ffff:192.168.178.20) closed connection to service hplaserjet1320series
[2009/11/30 22:09:56,  0] smbd/server.c:1065(main)
  smbd version 3.4.2-1.1.3.1-2229-SUSE-SL11.2 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2009/11/30 22:09:57,  0] printing/print_cups.c:103(cups_connect)
  Unable to connect to CUPS server localhost:631 - Verbindungsaufbau abgelehnt
[2009/11/30 22:09:57,  0] printing/print_cups.c:103(cups_connect)
  Unable to connect to CUPS server localhost:631 - Verbindungsaufbau abgelehnt
[2009/11/30 22:10:00,  0] smbd/server.c:457(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Die Adresse wird bereits verwendet
[2009/11/30 22:10:00,  0] smbd/server.c:457(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Die Adresse wird bereits verwendet
[2009/11/30 22:23:15,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP

oder aus der /var/log/warn:

Code:
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:06:04 linux-25f1 hp[12880]: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:08:12 linux-25f1 auditd[3109]: Error sending signal_info request (Operation not supported)
Nov 30 22:08:13 linux-25f1 ifdown:               No configuration found for wlan0 
Nov 30 22:08:13 linux-25f1 ifdown:               Nevertheless the interface will be shut down.
Nov 30 22:08:13 linux-25f1 nmbd[12457]: [2009/11/30 22:08:13,  0] nmbd/nmbd.c:71(terminate)
Nov 30 22:08:13 linux-25f1 nmbd[12457]:   Got SIGTERM: going down...
Nov 30 22:08:13 linux-25f1 rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"
Nov 30 22:09:42 linux-25f1 kdm_config[1585]: Multiple occurrences of key 'Language' in section [X-*-Greeter] of /usr/share/kde4/config/kdm/kdmrc
Nov 30 22:09:42 linux-25f1 kdm_config[1585]: Multiple occurrences of key 'ShowUsers' in section [X-*-Greeter] of /usr/share/kde4/config/kdm/kdmrc
Nov 30 22:09:42 linux-25f1 kdm_config[1585]: Multiple occurrences of key 'Theme' in section [X-*-Greeter] of /usr/share/kde4/config/kdm/kdmrc
Nov 30 22:09:42 linux-25f1 kdm_config[1585]: Multiple occurrences of key 'UseBackground' in section [X-*-Greeter] of /usr/share/kde4/config/kdm/kdmrc
Nov 30 22:09:42 linux-25f1 kdm_config[1585]: Multiple occurrences of key 'UseTheme' in section [X-*-Greeter] of /usr/share/kde4/config/kdm/kdmrc
Nov 30 22:09:42 linux-25f1 kdm_config[1585]: Multiple occurrences of key 'AllowShutdown' in section [X-:*-Core] of /usr/share/kde4/config/kdm/kdmrc
Nov 30 22:09:42 linux-25f1 kdm_config[1585]: Multiple occurrences of key 'AutoLoginEnable' in section [X-:0-Core] of /usr/share/kde4/config/kdm/kdmrc
Nov 30 22:09:42 linux-25f1 kernel: [   30.253294] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
Nov 30 22:09:42 linux-25f1 kernel: [   30.253408] CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
Nov 30 22:09:42 linux-25f1 kernel: [   30.253414] nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
Nov 30 22:09:42 linux-25f1 kernel: [   30.253419] sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
Nov 30 22:09:53 linux-25f1 dhcpcd[2125]: eth0: Failed to lookup hostname via DNS: Name or service not known
Nov 30 22:09:54 linux-25f1 ifup:               No configuration found for wlan0
Nov 30 22:09:57 linux-25f1 smbd[3462]: [2009/11/30 22:09:57,  0] printing/print_cups.c:103(cups_connect)
Nov 30 22:09:57 linux-25f1 smbd[3462]:   Unable to connect to CUPS server localhost:631 - Verbindungsaufbau abgelehnt
Nov 30 22:09:57 linux-25f1 smbd[3463]: [2009/11/30 22:09:57,  0] printing/print_cups.c:103(cups_connect)
Nov 30 22:09:57 linux-25f1 smbd[3463]:   Unable to connect to CUPS server localhost:631 - Verbindungsaufbau abgelehnt
Nov 30 22:10:00 linux-25f1 smbd[3466]: [2009/11/30 22:10:00,  0] smbd/server.c:457(smbd_open_one_socket)
Nov 30 22:10:00 linux-25f1 smbd[3466]:   smbd_open_once_socket: open_socket_in: Die Adresse wird bereits verwendet
Nov 30 22:10:00 linux-25f1 smbd[3466]: [2009/11/30 22:10:00,  0] smbd/server.c:457(smbd_open_one_socket)
Nov 30 22:10:00 linux-25f1 smbd[3466]:   smbd_open_once_socket: open_socket_in: Die Adresse wird bereits verwendet
Nov 30 22:10:26 linux-25f1 nmbd[2879]: [2009/11/30 22:10:26,  0] nmbd/nmbd_become_lmb.c:395(become_local_master_stage2)
Nov 30 22:10:26 linux-25f1 nmbd[2879]:   *****
Nov 30 22:10:26 linux-25f1 nmbd[2879]:   
Nov 30 22:10:26 linux-25f1 nmbd[2879]:   Samba name server LINUX11 is now a local master browser for workgroup TUX-NET on subnet 192.168.178.22
Nov 30 22:10:26 linux-25f1 nmbd[2879]:   
Nov 30 22:10:26 linux-25f1 nmbd[2879]:   *****
Nov 30 22:14:21 linux-25f1 checkproc: checkproc: can not get session id for process 3951!
Nov 30 22:14:25 linux-25f1 kernel: [  313.769766] JBD: barrier-based sync failed on md1:8 - disabling barriers
Nov 30 22:14:37 linux-25f1 python: hp-systray[4340]: error: option -s not recognized
Nov 30 22:15:09 linux-25f1 python: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:15:09 linux-25f1 python: io/hpmud/musb.c 1104: unable to open hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:15:09 linux-25f1 python: hp-systray(hpdio)[4364]: error: Unable to communicate with device (code=12): hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:15:09 linux-25f1 python: hp-systray(hpdio)[4364]: error: Device not found
Nov 30 22:15:24 linux-25f1 python: io/hpmud/musb.c 594: invalid usb_open: Keine Berechtigung
Nov 30 22:15:24 linux-25f1 python: io/hpmud/musb.c 1104: unable to open hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:15:24 linux-25f1 python: hp-toolbox(UI)[4400]: error: Unable to communicate with device (code=12): hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:15:24 linux-25f1 python: hp-toolbox(UI)[4400]: error:  Unable to open device hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488. 
Nov 30 22:15:58 linux-25f1 python: io/hpmud/musb.c 594: invalid usb_open: Keine Berechtigung
Nov 30 22:15:58 linux-25f1 python: io/hpmud/musb.c 1104: unable to open hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:15:58 linux-25f1 python: hp-toolbox(UI)[4400]: error: Unable to communicate with device (code=12): hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:15:58 linux-25f1 python: hp-toolbox(UI)[4400]: error:  Unable to open device hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488. 
Nov 30 22:33:13 linux-25f1 python: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:33:13 linux-25f1 python: io/hpmud/musb.c 1104: unable to open hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:33:13 linux-25f1 python: hp-systray(hpdio)[4364]: error: Unable to communicate with device (code=12): hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:33:13 linux-25f1 python: hp-systray(hpdio)[4364]: error: Device not found
Nov 30 22:33:16 linux-25f1 python: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:33:16 linux-25f1 python: io/hpmud/musb.c 1104: unable to open hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:33:16 linux-25f1 python: hp-systray(hpdio)[4364]: error: Unable to communicate with device (code=12): hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:33:16 linux-25f1 python: hp-systray(hpdio)[4364]: error: Device not found
Nov 30 22:33:17 linux-25f1 python: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:33:17 linux-25f1 python: io/hpmud/musb.c 1104: unable to open hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:33:17 linux-25f1 python: hp-systray(hpdio)[4364]: error: Unable to communicate with device (code=12): hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:33:17 linux-25f1 python: hp-systray(hpdio)[4364]: error: Device not found
Nov 30 22:53:23 linux-25f1 python: io/hpmud/musb.c 594: invalid usb_open: Permission denied
Nov 30 22:53:23 linux-25f1 python: io/hpmud/musb.c 1104: unable to open hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:53:23 linux-25f1 python: hp-systray(hpdio)[4364]: error: Unable to communicate with device (code=12): hp:/usb/hp_LaserJet_1320_series?serial=00CNM1D28488
Nov 30 22:53:23 linux-25f1 python: hp-systray(hpdio)[4364]: error: Device not found

Die /var/log/boot.msg zeigt keine Auffälligkeiten.
Ach so, bevor ich es vergesse, hier noch ein paar Versionsnummern:

SAMBA: 3.4.2-1.1.3.1-i586 von openSUSE-Oss
CUPS: 1.3.11-4.1-i586 von openSUSE-Oss
HPLIP: 3.9.8-3.4.1-i586 von openSUSE-Oss

Vielleicht hat einer eine Idee dazu. Vielleicht ist da irgendwo auch noch ein Bug drin. Unter SUSE 11.1 hat das mit der gleichen Konfiguration jedenfalls einwandfrei geklappt. Ist auch das, was im Kofler beschrieben ist.
 

stka

Guru
Hast du deine Drucker im CUPS freigegeben? Kannst du auch im yast machen. Denn normaler weise darf nur localhost drucken.
 
OP
VN-Andy

VN-Andy

Member
Hallo stka,

ja, die Drucker sind freigegeben. Meiner Meinung nach ist das aber uninteressant, da dies mit den Samba-Einstellungen nichts zu tun hat. Sonst würden die Drucker nach einem reload auch nicht arbeiten.
 

stka

Guru
Wenn cups die Druckaufträge nur von 127.0.0.1 annimmt, dann kannst du über samba auch nicht drucken. Zeig doch mal deine /etc/cups/cupsd.conf, aber bitte ohne die ganzen Kommentare.
 
OP
VN-Andy

VN-Andy

Member
Hallo stka,

ich denke nicht, dass CUPS damit etwas zu tun hat, ich tippe mehr auf SAMBA. Nach einem /etc/init.d/smb reload funktioniert doch alles. Es köönte natürlich sein, dass CUPS erst nach SAMBA geladen wird und SAMBA dadurch die CUPS-Drucker nicht findet. Trotzdem hier mal die gewünschte cupsd.conf:
Code:
# Administrator user group...
SystemGroup sys root


# Only listen for connections from the local machine.
Listen *:631
Listen localhost:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow none
BrowseDeny all

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
Allow @LOCAL
Order allow,deny
Allow 127.0.0.2
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Encryption Required
  Order allow,deny
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

DefaultPolicy default

# easy is a very relaxed policy
<Policy easy>
  # Job-related operations must be done by the owner or an administrator...
  <Limit All>
    Satisfy any
    Order allow,deny
  </Limit>
</Policy>

# paranoid is a very restricted policy
<Policy paranoid>
  # Job-related operations must be done by the owner
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
    Require user @OWNER
    Allow from 127.0.0.0/8
    Order deny,allow
  </Limit>
  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Allow from 127.0.0.0/8
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Allow from 127.0.0.0/8
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER
    Allow from 127.0.0.0/8
    Order deny,allow
  </Limit>

  <Limit All>
    Require user @OWNER @SYSTEM
    Allow from 127.0.0.0/8
    Order deny,allow
  </Limit>
</Policy>

#

Gruß Andreas
 

stka

Guru
Mmmhhh, die ist in Ordnung :???: Schau doch mal, ob du was im Log /var/log/samba/log.smbd findest wenn der Client auf den Drucker zugreift, bevor du smb neu gestartet hast, setze eventuell in der smb.conf das Loglevel mal auf 2 oder 3 dafür. Auch die /varl/log/cups/access_log und error_log solltest du mal beobachten. Im Moment fällt mir so ohne Log auch nichts weiter ein.
 
OP
VN-Andy

VN-Andy

Member
Hallo stka,

sorry für die späte Antwort, war beruflich unterwegs. Aber hier nun ein paar logs, wie gewünscht. Diese sind nach 2 Stunden nach dem Booten entstanden, allerdings ohne 'reload'. Erst einmal die error_log von cups:
Code:
I [08/Dec/2009:07:42:27 +0100] Listening to 0.0.0.0:631 (IPv4)
I [08/Dec/2009:07:42:29 +0100] Listening to :::631 (IPv6)
I [08/Dec/2009:07:42:29 +0100] Listening to ::1:631 (IPv6)
I [08/Dec/2009:07:42:29 +0100] Listening to 127.0.0.1:631 (IPv4)
I [08/Dec/2009:07:42:29 +0100] Listening to /var/run/cups/cups.sock (Domain)
I [08/Dec/2009:07:42:29 +0100] Remote access is enabled.
I [08/Dec/2009:07:42:29 +0100] Loaded configuration file "/etc/cups/cupsd.conf"
I [08/Dec/2009:07:42:29 +0100] Using default TempDir of /var/spool/cups/tmp...
I [08/Dec/2009:07:42:29 +0100] Configured for up to 100 clients.
I [08/Dec/2009:07:42:29 +0100] Allowing up to 100 client connections per host.
I [08/Dec/2009:07:42:29 +0100] Full reload is required.
I [08/Dec/2009:07:42:29 +0100] Loaded MIME database from '/etc/cups': 37 types, 41 filters...
I [08/Dec/2009:07:42:29 +0100] Loading job cache file "/etc/cups/yes/job.cache"...
I [08/Dec/2009:07:42:29 +0100] Full reload complete.
I [08/Dec/2009:07:42:29 +0100] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [08/Dec/2009:07:42:29 +0100] Listening to 0.0.0.0:631 on fd 4...
I [08/Dec/2009:07:42:29 +0100] Listening to :::631 on fd 6...
E [08/Dec/2009:07:42:29 +0100] Unable to bind socket for address ::1:631 - Address already in use.
E [08/Dec/2009:07:42:29 +0100] Unable to bind socket for address 127.0.0.1:631 - Address already in use.
I [08/Dec/2009:07:42:30 +0100] Listening to /var/run/cups/cups.sock on fd 7...
I [08/Dec/2009:07:42:30 +0100] Resuming new connection processing...

Dort sind zwei Fehler aufgetreten, die mit der socket-Verbindung zu tun haben. Leider bin ich damit etwas überfordert um diese zu deuten.

Die access_log von cups sieht hingegen völlig normal aus:
Code:
localhost - - [08/Dec/2009:07:42:47 +0100] "POST / HTTP/1.1" 200 266 CUPS-Get-Printers successful-ok
localhost - - [08/Dec/2009:07:42:47 +0100] "POST / HTTP/1.1" 200 266 CUPS-Get-Printers successful-ok

Die log_smbd zeigt allerdings auch ein paar Fehler direkt beim Zugriff, die Drucker können nicht gefunden werden (ich sehe sie ja auch unter Windows nicht):
Code:
[2009/12/08 07:42:27,  0] smbd/server.c:1065(main)
  smbd version 3.4.2-1.1.3.1-2229-SUSE-SL11.2 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2009/12/08 07:42:27,  0] printing/print_cups.c:103(cups_connect)
  Unable to connect to CUPS server localhost:631 - Verbindungsaufbau abgelehnt
[2009/12/08 07:42:27,  0] printing/print_cups.c:103(cups_connect)
  Unable to connect to CUPS server localhost:631 - Verbindungsaufbau abgelehnt
[2009/12/08 07:42:27,  0] smbd/server.c:457(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Die Adresse wird bereits verwendet
[2009/12/08 07:42:27,  0] smbd/server.c:457(smbd_open_one_socket)
  smbd_open_once_socket: open_socket_in: Die Adresse wird bereits verwendet
[2009/12/08 09:35:10,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Keine Berechtigung
[2009/12/08 09:35:10,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Datei oder Verzeichnis nicht gefunden
[2009/12/08 09:35:10,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service hplaserjet1320series
[2009/12/08 09:38:25,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Keine Berechtigung
[2009/12/08 09:38:25,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Datei oder Verzeichnis nicht gefunden
[2009/12/08 09:38:25,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service hplaserjet1320series
[2009/12/08 09:38:30,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Keine Berechtigung
[2009/12/08 09:38:30,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Datei oder Verzeichnis nicht gefunden
[2009/12/08 09:38:30,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service hplaserjet1320series
[2009/12/08 09:38:35,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Keine Berechtigung
[2009/12/08 09:38:35,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Datei oder Verzeichnis nicht gefunden
[2009/12/08 09:38:35,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service hplaserjet1320series
[2009/12/08 09:38:40,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Keine Berechtigung
[2009/12/08 09:38:40,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Datei oder Verzeichnis nicht gefunden
[2009/12/08 09:38:40,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service hplaserjet1320series
[2009/12/08 09:38:45,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Keine Berechtigung
[2009/12/08 09:38:45,  0] param/loadparm.c:8546(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/hplaserjet1320series failed. Datei oder Verzeichnis nicht gefunden
[2009/12/08 09:38:45,  0] smbd/service.c:1188(make_connection)
  aklafft (::ffff:192.168.178.20) couldn't find service hplaserjet1320series

Hier fällt mir auf, dass Samba ca. 2 sec. vor den CUPS-Fehler-Meldungen auf CUPS zugreift.
CUPS-Fehler-Meldung = 07:42:29
SAMBA-Start = 07:42:27
Das bedeutet für mich, dass CUPS noch gar nicht hochgefahren ist, wenn SAMBA darauf zugreift. Könnte das der Grund für die Fehler sein?

Nach dem reload steht dann folgendes in den logs:

/cups/access_log:
Code:
localhost - - [08/Dec/2009:09:51:11 +0100] "POST / HTTP/1.1" 200 129 CUPS-Get-Printers successful-ok
localhost - - [08/Dec/2009:09:51:11 +0100] "POST / HTTP/1.1" 200 129 CUPS-Get-Classes successful-ok

/samba/log.smbd:
Code:
[2009/12/08 09:51:11,  1] smbd/process.c:756(smbd_sig_hup_handler)
  Reloading services after SIGHUP

Die error_log von cups hat keinen neuen Eintrag. Es scheint also, dass sich beim Starten Samba mit CUPS nicht sauber verbindet. Was ist beim systemstart aber anders als beim 'reload'?

Gruß Andreas
 

stka

Guru
Es sieht so aus, als würde dein Cups nicht auf 127.0.0.1 lauschen, das muss aber da sich Samba darüber mit Cups verbindet, als kann samba auch cups nicht nutzen und somit deine Win user nicht drucken.
Mhhhhhh so langsam wird das echt strange mit deiner Kiste. Auf der anderen Seite, wenn deine Win user nicht drucken können, schont das auch die Umwelt :D

Poste doch mal das Ergebnis von dem Kommando "netstat -tlpn" wenn du das als root machst.
 
OP
VN-Andy

VN-Andy

Member
Hallo stka,

hier der gewunschte dump:
Code:
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      3151/rpcbind 
tcp        0      0 0.0.0.0:11953           0.0.0.0:*               LISTEN      4034/skype   
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN      3335/cupsd   
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      3660/master  
tcp        0      0 :::111                  :::*                    LISTEN      3151/rpcbind 
tcp        0      0 :::631                  :::*                    LISTEN      3335/cupsd   
tcp        0      0 :::25                   :::*                    LISTEN      3660/master  
tcp        0      0 :::445                  :::*                    LISTEN      3928/smbd    
tcp        0      0 :::139                  :::*                    LISTEN      3928/smbd

Das scheint alles irgendwie zu stimmen, bringt auch das gleiche Ergebnis vor oder nach einem Reload. Den CUPS-Server kann ich übrigens auch ohne Probleme unter http://127.0.0.1:631 erreichen (auch vor dem Reload).

Gruß Andreas
 

stka

Guru
Ich glaube da müssen wir mal den Grothesk fragen, der ist der Voodoo Experte ;-). Denn so langsam komme ich da auch nicht mehr weiter. Ich mach mir noch mal Gedanken dazu, wie du das noch mal testen kannst.
Kennst du dich mit wireshark etwas aus? Wenn ja, kannst du damit mal die Pakete beobachten ob da was auffällig ist.
 
OP
VN-Andy

VN-Andy

Member
Hallo stka,

Wireshark?!?!? Nie gehört. Mal sehen, ob jemand anderes was weiß. Aber Danke für deine Versuche.

Gruß Andreas
 
Hallo Zusammen, hatte gleiches Problem. Folgener Beitrag hat mir geholfen.

http://www.betriebssystemforum.de/windows-7/mit-windows-7-auf-einem-linux-drucker-drucken/

Es gab dann zwar noch ein kleines Problem beim Drucken da das Druckformat nicht unterstützt wurde. Aber einfach in der mime.types, mime.convs, cupsd.conf die ausgerauteten raw-formate wieder aktiviert und gut wars. Cups neu gestartet und funz.

Bis dene :D
 
Oben