Skocz do zawartości

Polecane posty

Witam. Muszę przyznać, że rozkładam ręce.

Mam problem z podstawowym udostępnieniem drukarki(Brother DCP- 130C) pod Debian.

Zaintsalowałem dla testu Debiana na karcie CF Ultra SDHC bez środowiska graficzna, z serwerem wydruku, ssh, oraz z serwerem plików.

Dla ułatwienia doinstalowałem Webmin'a do łatwiejszej konfiguracji udostępnionych katalogów( to tak dla testów-dysk 80gb odłączony, zapełniony przez zdjęcia i pliki z Tranmission)

 

wpisując www.localhost:631 nic się nie dzieje- biała strona.

Oczywiście czytałem kilka wątków odnośnie Samba, Cups, ale to czarna magia.

Istnieje jakieś proste rozwiązanie do udostępniania drukarki wewnątrz sięci WIFI (laptop-Win7, PC-XP)

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Dla pewności, 127.0.0.1:631 też próbowałeś?

 

tak próbowalem. Nawet 192.168.0.12:631

 

#

nano /etc/cups/cupsd.conf
#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0

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

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd

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

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  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$
    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 CUPS-Get-Devic$
    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-H$
    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>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew$
    AuthType Default
    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-H$
    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>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

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

#

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

# ps -A

  PID TTY          TIME CMD
    1 ?        00:00:01 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:00 events/0
    7 ?        00:00:00 cpuset
    8 ?        00:00:00 khelper
    9 ?        00:00:00 netns
   10 ?        00:00:00 async/mgr
   11 ?        00:00:00 pm
   12 ?        00:00:00 sync_supers
   13 ?        00:00:00 bdi-default
   14 ?        00:00:00 kintegrityd/0
   15 ?        00:00:00 kblockd/0
   16 ?        00:00:00 kacpid
   17 ?        00:00:00 kacpi_notify
   18 ?        00:00:00 kacpi_hotplug
   19 ?        00:00:00 kseriod
   21 ?        00:00:00 kondemand/0
   22 ?        00:00:00 khungtaskd
   23 ?        00:00:00 kswapd0
   24 ?        00:00:00 ksmd
   25 ?        00:00:00 aio/0
   26 ?        00:00:00 crypto/0
  155 ?        00:00:00 ksuspend_usbd
  156 ?        00:00:00 khubd
  162 ?        00:00:00 ata/0
  163 ?        00:00:00 ata_aux
  164 ?        00:00:00 scsi_eh_0
  165 ?        00:00:00 scsi_eh_1
  207 ?        00:00:00 kjournald
  272 ?        00:00:00 udevd
  416 ?        00:00:00 kpsmoused
  521 ?        00:00:00 flush-8:0
  583 ?        00:00:00 kjournald
  584 ?        00:00:00 kjournald
  585 ?        00:00:00 kjournald
  586 ?        00:00:00 kjournald
  638 ?        00:00:00 portmap
  653 ?        00:00:00 rpc.statd
  827 ?        00:00:00 rsyslogd
  863 ?        00:00:00 rpciod/0
  864 ?        00:00:00 acpid
  870 ?        00:00:00 atd
  900 ?        00:00:00 cron
  907 ?        00:00:00 lockd
  910 ?        00:00:00 nfsd4
  911 ?        00:00:00 nfsd
  912 ?        00:00:00 nfsd
  913 ?        00:00:00 nfsd
  914 ?        00:00:00 nfsd
  915 ?        00:00:00 nfsd
  916 ?        00:00:00 nfsd
  917 ?        00:00:00 nfsd
  918 ?        00:00:00 nfsd
  925 ?        00:00:00 rpc.mountd
  931 ?        00:00:00 dbus-daemon
  943 ?        00:00:00 avahi-daemon
  944 ?        00:00:00 avahi-daemon
 1003 ?        00:00:00 dhclient
 1289 ?        00:00:00 inetd
 1309 ?        00:00:00 sshd
 1316 ?        00:00:00 exim4
 1345 ?        00:00:03 miniserv.pl
 1358 tty1     00:00:00 getty
 1359 tty2     00:00:00 getty
 1360 tty3     00:00:00 getty
 1361 tty4     00:00:00 getty
 1362 tty5     00:00:00 getty
 1363 tty6     00:00:00 getty
 1572 ?        00:00:00 console-kit-dae
 5026 ?        00:00:00 cupsd
 6574 ?        00:00:00 udevd
 6581 ?        00:00:00 udevd
 6882 ?        00:00:00 nmbd
 6886 ?        00:00:00 smbd
 6898 ?        00:00:00 smbd
 8966 ?        00:00:00 smbd
 8971 ?        00:00:00 sshd
 8977 pts/0    00:00:00 bash
 8991 pts/0    00:00:00 ps

Z tego co rozumiem to działa. Samba również.

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

To pokaż jeszcze wynik netstat --unix -ln oraz netstat -tln i napisz czy łączysz się z komputera na którym cups działa czy z innego komputera z sieci?

 

 

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

dla polecenia netstat --unix -ln:

Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     3533     /var/run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     3746     /var/run/dbus/system_                                             bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     3785     /var/run/avahi-daemon                                             /socket
unix  2      [ ACC ]     STREAM     LISTENING     12345    /var/run/cups/cups.so                                             ck

dla

# netstat -tln

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:58870           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:33495           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:901             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:55815           0.0.0.0:*               LISTEN
tcp6       0      0 :::139                  :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 ::1:631                 :::*                    LISTEN
tcp6       0      0 ::1:25                  :::*                    LISTEN
tcp6       0      0 :::445                  :::*                    LISTEN

Zapomniałem dodać, a tak czułem, że to może ważna informacja. Łącze się przez SSH (PuTTY) z komputera stacjonarnego podłączonego kablem do routera, do którego również kablem podłączony jest terminal.

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

No to zmień cupsd.conf. zamiast localhost:631 napisz 192.168.0.12:631 (jeśli się nie mylę to taki adres ma ten komputer z cupsd) zrestartuj cupsa i wtedy powinieneś połączyć się na http:// 192.168.0.12:631

 

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

zmieniłem, zrestartowałem i teraz wchodząc na http:// 192.168.0.12:631 mam:

403 Zabronione.

 

Takie problemy z instalacją a gdzie tam dodanie drukarki i sterowników :(

 

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Do

 

# Restrict access to the server...
<Location />
Order allow,deny
</Location>

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

Dorzuć Allow 192.168.0.*

czyli będzie to wyglądać.

 

# Restrict access to the server...
<Location />
Order allow,deny
Allow 192.168.0.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
Allow 192.168.0.*
</Location>

 

 

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Dzięki Regdos :) połączyłem się, dodałem drukarkę, sterowniki dałem jakieś inne/złe, ale z pc(win xp) wydrukowałem kilka maili.

Kiedy chciałem dodać urządzenie w Win 7 na laptopie to coś się nie udało. Nie mogłem się połączyć. Następnie spróbowałem znowu wydrukować z PC to wyskoczył błąd "Wystąpił nieznany błąd podczas drukowania."

Wchodząc na strone https:// 192.168.0.12:631/ działa, ale już https:// 192.168.0.12:631/admin nie (Połączenie zostało zresetowane - Połączenie z serwerem zostało zresetowane podczas wczytywania strony.) Dziwne... zwłaszcza, że 15 minut temu działało :)

 

 

 

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Zaloguj się, aby skomentować

Będziesz mógł dodać komentarz po zalogowaniu się



Zaloguj się

×