Samba, cups - udost

Konfiguracja serwerów, usług, itp.
cooleq
Beginner
Posty: 172
Rejestracja: 18 czerwca 2010, 13:47
Lokalizacja: Wrocław

Samba, cups - udostępnienie drukarek bez autoryzacji

Post autor: cooleq »

Witam,
przejrzałem już milion tematów i nic nie mogę znaleźć. Chodzi o to, że między udziałami mam udostępnione dwie drukarki. Jednak jeśli udziały są zmapowane w windowsach to nie trzeba się do nich logować. Tymczasem drukarki wymagają zalogowania się do serwera np przez otoczenie sieciowe.
Chodzi o to, żeby nie trzeba było się do nich logować od razu po włączeniu komputera. Próbowałem to ustawić w cupsd.conf

Kod: Zaznacz cały

LogLevel warningSystemGroup lpadmin
Allow remote access
Port 631
Listen /192.168.0.*
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
#DefaultAuthType Basic
<Location />
  # Allow shared printing...
  Order allow,deny
  Allow all
</Location>
<Location /admin>
  # Restrict access to the admin pages...
  Order allow,deny
  Allow localhost
  Allow @LOCAL
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  # Restrict access to the configuration files...
  Order allow,deny
</Location>
<Policy default>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subs$
    Require user @OWNER @SYSTEM
    Order deny,allow
    allow all
  </Limit>
  <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>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-P$
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
Chyba jest wszystko w porządku. Wniosek, źle skonfigurowana samba.

Kod: Zaznacz cały

#




#======================= Global Settings =======================


[global]


   workgroup = ansee
   server string = %h server
   wins support = yes
   dns proxy = no
;   name resolve order = lmhosts host wins bcast


#### Networking ####


;   interfaces = 127.0.0.0/8 eth0


;   bind interfaces only = yes


os level = 20


#### Debugging/Accounting ####


   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d




####### Authentication #######




   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes




########## Printing ##########


# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
#   load printers = yes


# lpr(ng) printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap


# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
;   printing = cups
;   printcap name = cups


############ Misc ############


# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m


# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
#   socket options = TCP_NODELAY


# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &


# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
#   domain master = yes


# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash


# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
;   winbind enum groups = yes
;   winbind enum users = yes




usershare max shares = 100




  local master = yes
  preferred master = yes
  global master = yes
  os level = 20
#time server
  time server = True


#agresywne buforowanie


   oplocks = True
   level2 oplocks = True




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




[printers]
   comment = All Printers
   browseable = yes
   path = /var/spool/samba
   printable = yes
   guest ok = yes
   read only = yes
   create mask = 0700


# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin


Wyciąłem pozostałe udziały bo nie mają znaczenia. Generalnie drukarki nie są w udziale printers tylko "luzem" razem z folderami(nie wiem czy tak to powinno być, ale mi to pasuje) Kwestia jest tego, żeby przyjmowały nieautoryzowanych użytkowników.
ODPOWIEDZ