Samba/Cups Printserver drucken ohne Authentifizierung

D

darktemplaaa

Grünschnabel
Hallo zusammen!


Ich möchte hier einen Cups/Samba Druckerserver für Windows Clients aufsetzen. Es funktioniert alles prima. Ich kann vom Windows Client Druckertreiber auf den Linuxserver kopieren etc. Jetzt ist mein Problem, dass ich es Benutzern ermöglichen möchte, dass sie auf die Freigabe des Servers gehen können, sprich den Explorer öffnen und "\\DruckerserverIP" eingeben und die freigegebenen Drucker aufgelistet bekommen und sich mit diesen dann verbinden können. Dies funktioniert auch alles nur kann der Client nicht drucken. Nehme ich aus der smb.conf die Optionen für den guest Account heraus, so dass eine Authentifizierung durch eine Druckeradmin von Nöten ist, funktioniert es. Ich möchte jetzt aber logischerweise den Benutzern nicht zumuten einen Benutzernamen einzugeben. Das muss ja auch so gehen. Anbei paste ich mal meine smb.conf mit guest account. Die Config hab ich aus diversen HowTos wo es angeblich funtionieren soll.

Hier noch Infos zu den Dateirechten:
Code:
ls -al  /var/spool/samba/
total 8
drwxrwxrwt  2 root root 4096 2009-03-12 14:02 .
drwxr-xr-x  7 root root 4096 2009-02-23 13:38 ..
-rw-r--r-- 14 root root    0 2009-02-23 13:38 .keep_net-fs_samba-0

Code:
ls -la /var/samba/drivers/
total 36
drwxrwxr-x 9 root ntadmin 4096 2009-03-12 11:48 .
drwxr-xr-x 3 root root    4096 2009-02-23 14:58 ..
drwxrwxr-x 2 root ntadmin 4096 2009-02-23 14:59 IA64
drwxrwxr-x 2 root ntadmin 4096 2009-02-23 14:59 W32ALPHA
drwxrwxr-x 2 root ntadmin 4096 2009-02-23 14:59 W32MIPS
drwxrwxr-x 2 root ntadmin 4096 2009-02-23 14:59 W32PPC
drwxrwxr-x 2 root ntadmin 4096 2009-02-23 15:00 W32WIN40
drwxrwxr-x 3 root ntadmin 4096 2009-02-27 11:05 W32X86
drwxrwxr-x 2 root ntadmin 4096 2009-02-23 15:00 x64

/etc/samba/smb.conf:

Code:
[global]
   server string = %h
   printing = cups
   printcap = cups
   printcap name = cups
#   printcap cache time = 750
   use client driver = yes   
   cups options = raw
   security = user
   printer admin = @ntadmin
   show add printer wizard = yes
   map to guest = Bad User
   guest account = nobody
   load printers = yes
   username map = /etc/samba/smbusers

[printers]
   comment = All Printers
   path = /var/spool/samba
   printable = yes
   create mask = 0700
   browseable = no
   printer admin = root, @ntadmin
   guest ok = yes
   guest only = yes
   writeable = no
   public = yes

[print$]
   comment = Printer Drivers
   path = /var/samba/drivers
   write list = root, @ntadmin
# force group = ntadmin
#   printer admin = @ntadmin
#   create mask = 0664
#   directory mask = 0775
   browseable = yes
   read only = yes
   guest ok = no

Wäre prima wenn mir einer von euch helfen könnte.
 
Der "guest account" fehlt dir, zb. guest account = printers, der user muss jedoch seperat angelegt werden.
 
Hi!

Wo muss der guest account angelegt werden? Im Linux System oder auf den Windows Rechnern? Ich mein reicht da nicht guest account = nobody? Ich mein was ich nicht verstehe ist es muss doch auch mit security = share gehen oder nicht? Weil das ist eigentlich genau das was ich will KEINE User Authentifizierung. Jeder soll mit dem Explorer browsen können und sich mit den ganzen freigegebenen Druckern verbinden können.
 
Zuletzt bearbeitet:
Der guest user muss auf dem linux-system angelegt sein.
Ich hab dir hier mal eine funktionierende Config angehängt:

Code:
#======================= Global Settings =====================================

[global]

# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
	workgroup = workgroup
	server string = Samba Server Version %v

;	netbios name = MYSERVER

;	interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
;	hosts allow = 127. 192.168.12. 192.168.13.

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

# logs split per machine
;	log file = /var/log/samba/%m.log
# max 50KB per log file, then rotate
;	max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Security can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

	security = share
	passdb backend = tdbsam

	
# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option

;	load printers = yes
	cups options = raw
	encrypt passwords = no
	guest ok = yes
	guest account = printer

;	printcap name = /etc/printcap
#obtain list of printers automatically on SystemV
;	printcap name = lpstat
;	printing = cups


#============================ Share Definitions ==============================

[homes]
	comment = Home Directories
	browseable = no
	writeable = yes
;	valid users = %S
;	valid users = MYDOMAIN\%S

[printers]
	comment = All Printers
	path = /var/spool/samba
	browseable = no
;	guest ok = no
;	writeable = no
	printable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
;	[netlogon]
;	comment = Network Logon Service
;	path = /var/lib/samba/netlogon
;	guest ok = yes
;	writable = no
;	share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;	[Profiles]
;	path = /var/lib/samba/profiles
;	browseable = no
;	guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the "staff" group
;	[public]
;	comment = Public Stuff
;	path = /home/samba
;	public = yes
;	writable = yes
;	printable = no
;	write list = +staff

[pccheck]
	path = /pccheck
;	writeable = no
;	browseable = yes
	guest ok = yes
	writeable = yes
	browseable = no
;	browseable = yes
;	writeable = no
;	browseable = yes
;	writeable = no
 
Hmm ich glaube es ist relativ egal welchen guest account man nimmt. Ob er jetzt "printer" "nobody" oder "foobar" heißt ist relativ egal. Ich habe es dennoch mal ausprobiert und es hat nicht geklappt. mitlerweile denke ich auch, dass es nicht an samba liegt sondern wahrscheinlich eher an cups. Samba präsentiert die Drucker ja richtig und ich kann einen Drucker auch verbinden nur daseigentliche Drucken funktioniert nicht.

Ich habe jetzt mal folgenden Test durchgeführt. In der /etc/cups/cupsd.conf habe ich einen Eintrag

Code:
SystemGroup ntadmin

In dieser Grupper habe ich logischerweise meinen printadmin. Wenn ich mit diesem Benutzer mich auf einem Windows System anmelde kann ich wie bereits schon erwähnt problemlos drucken. Entferne ich diesen Eintrag aus der /etc/cups/cupsd.conf kann auch dieser user nicht mehr drucken. Jetzt ist die große Frage was müsste eventuell in der cupsd.con eingetragen werden? Ist cups hier das Problem? Ich habe mal meine cupsd.conf als Textdatei angehangen.
 

Anhänge

  • cupsd.conf.txt
    2,8 KB · Aufrufe: 2
Mir ist jetzt erst aufgefallen das du eh einen guest account in der smb config hattest, hab den wohl überlesen.

Bezüglich der system user group in der cups conf geht IMO ein "allow all" nicht, setze die mal auf "sys nobody"
 
So ich habe das Problem gelöst! Mein Fehler war folgender:

Code:
<Location />
  AuthType Default <-- das muss weg!
  Allow From 10.9.111.*
  Allow From 10.250.131.*
  Allow From 10.9.100.*
  Encryption Required
  Order allow,deny
</Location>

In der Location / mag er es irgendwie nicht, dass man dort einen Authentifizierungstyp definiert. Was ich damit erreichen wollte (und was auch geklappt hat) war, dass man beim Aufruf der CUPS Webseite direkt Benutzer und Passwort angeben muss. Ich habe die Einstellung nun herausgenommen und in die Location /admin gepackt. Man kann jetzt zwar den Inhalt lesen, sieht halt welche Drucker installiert sind aber wenn man auf ein Objekt klickt kommt nun an dieser Stelle die Benutzeranmeldung. Anbei sende ich mal meine funktionierende cupsd.conf und smb.conf. Dir T-One vielen Dank für deine Hilfe!
 

Anhänge

  • cupsd.conf.txt
    4,3 KB · Aufrufe: 13
  • smb.conf.txt
    516 Bytes · Aufrufe: 9

Ähnliche Themen

SMB Zugriff auf Homeshare

Zugriff Ubuntu 16.04. auf Freigabe 18.04. LTS nicht möglich

Samba Dateien und Ordner verschieben

Keine Zugriff von Windows 10 auf Sambafreigaben

Zugriff auf Samba Fileserver Freigaben verweigert(Samba 4 Active Directory Domäne)

Zurück
Oben