Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cups e samba: stampare da win a gentoo [RISOLTO]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Gianni.Sax
n00b
n00b


Joined: 15 Jan 2005
Posts: 35
Location: Pisa (Italy)

PostPosted: Wed Feb 02, 2005 9:34 pm    Post subject: cups e samba: stampare da win a gentoo [RISOLTO] Reply with quote

Ciao,
ho questo problema: in casa ho un piccolo server gentoo che uso solo da console perché non ho installato X.

Ho installato una stampante HP-Laserjet USB emergendo cups e foomatic. Credo che funzioni tutto perché quando accedo con lynx localhost:631 vedo la mia stampante e riesco anche a stampare una pagina di prova. Questo è quello che vedo se vado su "Manage Printers":

Code:
Default Destination: HP-LaserJet

HP-LaserJet    HP LaserJet 1015 Foomatic/ljet4
Description: HP LaserJet 1015
Location:
Printer State: idle, accepting jobs.
Device URI: usb://HP/LaserJet%201015

Print Test Page Stop Printer Reject Jobs Modify Printer Configure Printer
Delete Printer Set As Default

hp_LaserJet_1015 hp LaserJet 1015 on Steeve.local
Description: hp LaserJet 1015
Location: Steeve
Printer State: idle, accepting jobs.
Device URI: usb://HP/LaserJet%201015

Print Test Page Stop Printer Reject Jobs Modify Printer Configure Printer Delete Printer Set As Default


La seconda stampante che vedete non è altro che la stessa HP che ho installato anche su un mac con osx e che quindi viene vista anche da linux (chissà perché... io non ho fatto nulla).

Il problema è riuscire a condividere in rete la stampante in modo che ci possa stampare dai pc con windows, ho seguito i consigli che ho trovato qui: http://www.cups.org/doc-1.1/sam.html al capitolo "Printing from Windows Clients", ma da windows non vedo la stampante.

Per essere più preciso vi faccio vedere il mio smb.conf:
Code:
[Global]
server string = Gentoo Server
hosts allow = 192.168.1.
encrypt passwords = yes

load printers = yes
printing = cups
printcap name = cups

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = root

[Geppetto]
public = yes
read only = no
path = /mnt/hdb/public
create mode = 0644
directory mode = 0755
guest ok = no


Nel file /etc/cups/client.conf c'è la riga
Code:
ServerName geppetto

infatti il pc con gentoo si chiama geppetto. Va bene così?

Samba funziona benissimo, riesco ad accedere alla risorsa condivisa "Geppetto" senza errori e riesco anche a scrivere.

Forse vi devo anche dire che siccome per accedere da windows devo immettere login e password, li ho salvati in modo da non doverli più scrivere, quindi quando da windows accedo tramite samba sono sempre l'utente "valenti". Non so se questo può influenzare o meno il fatto che non vedo la stampante.

Ho shorewall attivato, ma ho la porta 631 aperta in tcp. Deve rimanere aperta anche se stampo con samba?

Qualcuno ha idea di dove potrebbe essere il problema?

Grazie a tutti.
_________________
Hey! Ho un blog!


Last edited by Gianni.Sax on Thu Feb 03, 2005 4:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
n3mo
l33t
l33t


Joined: 28 Mar 2004
Posts: 657
Location: In a Cruel World

PostPosted: Wed Feb 02, 2005 9:46 pm    Post subject: Reply with quote

Perchè non dai un'occhiata qui, troverai anche altri riferimenti interessanti all'interno dell'howto.
_________________
Google, really.
Back to top
View user's profile Send private message
Bengio
Apprentice
Apprentice


Joined: 20 Feb 2003
Posts: 186
Location: Italy - Pisa

PostPosted: Thu Feb 03, 2005 2:38 am    Post subject: Reply with quote

Ho avuto problemi simili.

Ho le porte 631 e 515 aperte sia in tcp che udp per cups.
Mi ricordo che la stampante venne vista quando modificai i files mime.convs e mime.types dentro /etc/cups

Per la modifica segui il link di n3mo.

Salut,
Bengio
_________________
Registered as User #305777 with the Linux Counter.
Back to top
View user's profile Send private message
Gianni.Sax
n00b
n00b


Joined: 15 Jan 2005
Posts: 35
Location: Pisa (Italy)

PostPosted: Thu Feb 03, 2005 1:35 pm    Post subject: Reply with quote

Intanto grazie per gli aiuti :).

All'inizio avevo letto questo howto: http://www.gentoo.org/doc/it/printing-howto.xml

Ora che mi avete segnalato anche questo
http://www.gentoo.org/doc/it/quick-samba-howto.xml
me lo sono letto, però nei due documenti c'è scritto di fare cose diverse:

Uso il comando lpadmin o il comando foomatic-configure per configurare la stampante?

Io avevo usato foomatic-configure e in effetti la pagina di prova da localhost:631 me la stampava anche se da windows non mi stampava.

Per stampare da windows devo lasciare aperte solo le porte di samba o anche le porte di cups come dice Bengio?

Voi avete dovuto creare l'utente samba? Nel mio sistema non c'è...

Secondo voi cosa devo cambiare nella configurazione della stampante se non voglio usare l'accesso guest, ma continuare ad usare il mio utentino valenti con cui attualmente accedo alle risorse condivise con samba?

Scusate la rottura e grazie di tutto.
_________________
Hey! Ho un blog!
Back to top
View user's profile Send private message
active
Apprentice
Apprentice


Joined: 23 Jun 2003
Posts: 228
Location: Something not a structure or union

PostPosted: Thu Feb 03, 2005 2:21 pm    Post subject: Reply with quote

Gianni.Sax wrote:

Uso il comando lpadmin o il comando foomatic-configure per configurare la stampante?
Io avevo usato foomatic-configure e in effetti la pagina di prova da localhost:631 me la stampava anche se da windows non mi stampava.

Basta configurare la stampante dall'interfaccia web di cups, semplice, veloce e indolore :)
Gianni.Sax wrote:

Per stampare da windows devo lasciare aperte solo le porte di samba o anche le porte di cups come dice Bengio?

Modifica "browseable = Yes", aggiungi "use client driver = Yes". Abilita NetBIOS su win e aggiungi tranquillamente la stampante con i driver nativi.

Gianni.Sax wrote:

Voi avete dovuto creare l'utente samba? Nel mio sistema non c'è...

Solamente se utilizzi l'accesso su base utente (security = user).

Ovviamente tutto questo in ambito StandAlone

bye,
_________________
GIT d- s:+>: a-- C+++ UBS+++ P++ L+++
E--- W+ N+ w M- PS+(++) PE PGP+ !t
X++ tv+ b++ D+ G e h! r++ x*
Back to top
View user's profile Send private message
Gianni.Sax
n00b
n00b


Joined: 15 Jan 2005
Posts: 35
Location: Pisa (Italy)

PostPosted: Thu Feb 03, 2005 4:09 pm    Post subject: Reply with quote

Funziona! Grazie mille!

Ecco il mio smb.conf:
Code:
[Global]
server string = Gentoo Superserver
hosts allow = 192.168.1.
encrypt passwords = yes

load printers = yes
printing = cups
printcap name = cups

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
public = yes
guest ok = no
writable = no
printable = yes
use client driver = yes
printer admin = valenti, root

[HP-LaserJet]
comment = HP LaserJet
printable = yes
path = /var/spool/samba
public = yes
guest ok = no
printer admin = valenti, root


L'utente valenti è quello che uso per accedere a tutte le risorse samba sul server e tramite lo stesso utente riesco anche a stampare.

Le porte da aprire erano solo quelle di samba, non c'è bisogno di aprirne altre perché credo che la stampa avvenga tramite samba.

La stampante alla fine l'ho aggiunta usando foomatic-configure come è spiegato qui:
http://www.gentoo.org/doc/it/printing-howto.xml
Non fa altro che creare prima il file ppd e poi chiamare il comando lpadmin per aggiungerla a cups.

Ho anche seguito tutte le istruzioni di questo howto.

In più ho fatto questo:

Ho ricompilato tutto quello che dovevo ricompilare settando le flag use indicate qui:
http://www.gentoo.org/doc/it/quick-samba-howto.xml

Per accedere a cups via web bisogna aprire la porta 631 in tcp (io avevo installato shorewall) e poi configurare cupsd.conf così:

Code:

<Location />
Order Deny,Allow
#Allow From All
Deny From All
Allow From 192.168.1.*
</Location>

<Location /admin>
#
# [...]
#
AuthType Basic
AuthClass System
Order Deny,Allow
Deny From All
Allow From 192.168.1.*
</Location>


Alla fine ho modificaro il mio smb.conf con i consigli che mi ha dato active nel messaggio precedente.

Una cosa importante credo sia chiamare la stampante nel smb.conf con lo stesso nome (opzione -n) con cui la si è chiamata con foomatic-configure.

Ora stampo sulla mia HP sia da win che da mac osx usando i driver del sistema e anche la stampante è protetta da password.

Proverò ad abilitare l'accesso guest solo sulla stampante.

Spero che tutto questo torni utile anche a qualcun altro.

Grazie a tutti.
_________________
Hey! Ho un blog!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum