printer shared on a windows 7 server

I am using openSUSE 12.3 on machine called “sergioCasa” and Windows 7 on machine called “TaniaHp”

In the machine “TaniaHP”, there are some shared files and a shared printer HP DeskTop 4480
All shared folders are accessible, but Cups can not find the printer.

I’ve made ​​sure that the printer is shared and have also turned off the firewall of the two machines.
What can I do to solve this problem?

Thanks in advance.

Hi sergelli,

Your problem may be related to Samba name resolving. Can you ping TaniaHp and put here the content of /etc/nsswitch.conf?

I have am automated bash script solution that can activate and manage Samba on openSUSE. Please look here and ask for help if you don’t understand anything. Samba can allow usage of a Windows shared printer which sounds like what you need.

My bash script here can do it for you: S.A.C.T. - Samba Automated Configuration Tool - Version 1.06 - Blogs - openSUSE Forums

Thank You,

On 2013-11-03 00:26, sergelli wrote:
>
> I am using openSUSE 12.3 on machine called “sergioCasa” and Windows 7 on
> machine called “TaniaHp”
>
> In the machine “TaniaHP”, there are some shared files and a shared
> printer HP DeskTop 4480
> All shared folders are accessible, but Cups can not find the printer.

There are two methods to share a printer; the Windows way, or the Linux
way. Cups manages “the Linux way” and it can not see a printer shared
“the Windows way”.

A printer in Linux is shared via cups, and Windows can see it as an
“network” printer. Not, that’s not the correct name… ipp?
Besides that, the printer can be shared via samba, and then Windows sees
it the normal Windows way.

But you are doing it the other way round. I don’t know if Windows 7 can
export a printer the Linux way. It can import, certainly.

Now, I don’t think I’m explaining myself well :frowning:

Have a look here:


http://en.opensuse.org/Portal:Printing/Navigation

There is an article in the list named “SDB:Printing from Windows to
Linux”, read it.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On Sat, 02 Nov 2013 23:26:02 +0000, sergelli wrote:

> I am using openSUSE 12.3 on machine called “sergioCasa” and Windows 7 on
> machine called “TaniaHp”
>
> In the machine “TaniaHP”, there are some shared files and a shared
> printer HP DeskTop 4480 All shared folders are accessible, but Cups can
> not find the printer.
>
> I’ve made ​​sure that the printer is shared and have also turned off the
> firewall of the two machines.
> What can I do to solve this problem?
>
> Thanks in advance.

I would start with the info here:

http://en.opensuse.org/SDB:Printing_via_SMB_(Samba)_Share_or_Windows_Share

That should get you going.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun, 03 Nov 2013 00:33:05 +0000, Carlos E. R. wrote:

> But you are doing it the other way round. I don’t know if Windows 7 can
> export a printer the Linux way. It can import, certainly.

Yes, it can, and printer sharing in Windows is the way it’s done.

CUPS is used as a client in that instance - so CUPS is part of the
solution.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C


LinuxCasa:/home/sergio # ping TaniaHp
PING TaniaHp (192.168.1.31) 56(84) bytes of data.
64 bytes from TaniaHp (192.168.1.31): icmp_seq=1 ttl=128 time=159 ms
64 bytes from TaniaHp (192.168.1.31): icmp_seq=2 ttl=128 time=58.7 ms
64 bytes from TaniaHp (192.168.1.31): icmp_seq=3 ttl=128 time=956 ms


sergio@LinuxCasa:~> cat  /etc/nsswitch.conf


passwd: compat
group:  compat

hosts:  files mdns_minimal [NOTFOUND=return] dns wins
networks:       files dns

services:       files
protocols:      files
rpc:    files
ethers: files
netmasks:       files
netgroup:       files nis
publickey:      files

bootparams:     files
automount:      files nis
aliases:        files


On 2013-11-03 01:36, Jim Henderson wrote:

> I would start with the info here:
>
> http://en.opensuse.org/SDB:Printing_via_SMB_(Samba)_Share_or_Windows_Share
>
> That should get you going.

That’s “the Windows method” :wink:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)


LinuxCasa:/home/sergio # ping TaniaHp
PING TaniaHp (192.168.1.31) 56(84) bytes of data.
64 bytes from TaniaHp (192.168.1.31): icmp_seq=1 ttl=128 time=159 ms
64 bytes from TaniaHp (192.168.1.31): icmp_seq=2 ttl=128 time=58.7 ms
64 bytes from TaniaHp (192.168.1.31): icmp_seq=3 ttl=128 time=956 ms

Good!

So sergioCasa knows how to translate TaniaHp to an IP address. To configure the Samba printer via YaST you also need the printer share name (which can be quite different from the printer name in Windows). You can find it from sergioCasa with the following command:


$ smbclient -L taniahp -N

Here -N makes smbclient try to connect anonymously. If you need a specific username/password, use -U username%password]. From the output you should find the share name of the targeted printer.

Knowing the share name of your printer, you now need to check access right to the printer share. The following command will try to print a message:


$ echo 'Hello World!'  | smbclient //taniahp/printerShareName -c 'print -' -N

Did you look at my SACT bash script? For instance, there is no reason to disable the firewall. My bash script option 7 does everything to get Samba working including setting all required firewall settings. Option 5 allows you to edit the “/etc/samba/smb.conf” file as root and much more. Don’t be afraid and the price of free is always good.

S.A.C.T. - Samba Automated Configuration Tool - Version 1.06 - Blogs - openSUSE Forums

Thank You,

The command “smbclient-L-N taniahp” can see the shared printer on windows, then, what reason CUPS does not find this printer?

Additionally, YaST does not find this printer.


sergio@LinuxCasa:~>smbclient -L taniahp -N
Domain=[TANIAHP] OS=[Windows 7 Home Premium 7601 Service Pack 1] Server=[Windows 7 Home Premium 6.1]

        Sharename       Type      Comment
        ---------       ----      -------
        00TANIAHP       Disk      
        ADMIN$          Disk      Administração remota
        C$              Disk      Recurso compartilhado padrão
        D$              Disk      Recurso compartilhado padrão
        Hp              Disk      
        ImpressTania    Printer   HP Deskjet F4400 series
        IPC$            IPC       IPC remoto
        print$          Disk      Drivers de impressora
        Users           Disk      
        usrC            Disk      
        ViagemRio       Disk      
        ViagemRio2      Disk      fotos do Ria
Domain=[TANIAHP] OS=[Windows 7 Home Premium 7601 Service Pack 1] Server=[Windows 7 Home Premium 6.1]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------


I think “ImpressTania” is the shared printer, so…

                    
sergio@LinuxCasa:~> echo 'Hello World!'  | smbclient //taniahp/ImpressTania -c 'print -' -N
Domain=[TANIAHP] OS=[Windows 7 Home Premium 7601 Service Pack 1] Server=[Windows 7 Home Premium 6.1]
putting file - as stdin-1640 (0,0 kb/s) (average 0,0 kb/s)

But, the “Hello World” was not printed and there are not documents in the print queue TaniaHp

Uau…His work was very well prepared.

I wonder how do I find the flaws that exist in my system and what are the possible suggestions to fix these flaws.

Sorry, but I have not found a menu that makes this task within the SACT
Could you tell me how to do it?

Good new:

This time, I opened Firefox with CUPS and added the printer using the information obtained with the command “smbclient-L hostName-N” and now the printer is working.

This is an excellent forum, the help was very good.

Many thanks to all.

The command “smbclient-L-N taniahp” can see the shared printer on windows, then, what reason CUPS does not find this printer?

Additionally, YaST does not find this printer.

CUPS, as far as I know, uses SNMP to discover printers on the network. If the host sharing the printer doesn’t use SNMP, the “magic” doesn’t work :(.

So, most of the time you need the full network path of the printer in order to add it to CUPS (via YaST or any printer configuration utility). This is why I am asking all those questions about “can you ping the host?” “what is the printer share name?” “do you have the right to print?”.

What is important is that you have the right to use the printer, otherwise you would have an error. This answers the question “do you have the right to print?”.

Great!

You are welcome ;).

Have fun with openSUSE,

Like most things you need to read the blog and follow the instructions. The following terminal command must be copied into a terminal session and then you press enter:

rm ~/bin/sact ; wget -nc http://paste.opensuse.org/view/download/60035 -O ~/bin/sact ; chmod +x ~/bin/sact

SACT creates icons after it is run once. On the first use you must type in its name in terminal to be run.

sact

You must supply the root user password to create system icons: The main menu looks like this:

http://paste.opensuse.org/view/download/10143412

Thank You,

On Sun, 03 Nov 2013 01:58:06 +0000, Carlos E. R. wrote:

> On 2013-11-03 01:36, Jim Henderson wrote:
>
>> I would start with the info here:
>>
>> http://en.opensuse.org/SDB:Printing_via_SMB_
(Samba)_Share_or_Windows_Share
>>
>> That should get you going.
>
> That’s “the Windows method” :wink:

Um, yeah - his printer is on a Windows 7 system.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-11-03 19:43, Jim Henderson wrote:
> On Sun, 03 Nov 2013 01:58:06 +0000, Carlos E. R. wrote:

>> That’s “the Windows method” :wink:
>
> Um, yeah - his printer is on a Windows 7 system.

I know, I know. But even so, there are two methods to connect to them on
W7: the Linux way (IPP), or the Windows way.

I think these are the two relevant documents:

SDB:Printing from Windows to Linux

SDB:Printing via SMB (Samba) Share or Windows Share

For more documents:

Portal:Printing/Navigation


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On Sun, 03 Nov 2013 21:38:06 +0000, Carlos E. R. wrote:

> I know, I know. But even so, there are two methods to connect to them on
> W7: the Linux way (IPP), or the Windows way.

Perhaps, but he’s using printer sharing on Windows 7, which is going to be
SMB-based. So the easiest way to set it up is to use what’s already in
place with that, and to use CUPS to access the smb:// URI for the printer.

Jim

> I think these are the two relevant documents:
>
> > SDB:Printing from Windows to Linux](http://en.opensuse.org/SDB:Printing_from_Windows_to_Linux)

He’s not printing from Windows to Linux, as already established. He’s
printing from a Linux client to a Windows-hosted printer.

> [29_Share_or_Windows_Share"]
> SDB:Printing via SMB (Samba) Share or Windows Share](http://en.opensuse.org/SDB:Printing_via_SMB_(Samba%/color)

Yes, this is what he’s trying to do, and the information I referenced
gets him to where he wants to be.

Rather than take yet another thread off-track by debating the minutae,
edge cases, and exceptions where one /might/ do something in a way
different than the way that accomplishes the user’s goal, let’s stick to
helping this user with the setup he’s actually using, OK?

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2013-11-04 07:41, Jim Henderson wrote:
> On Sun, 03 Nov 2013 21:38:06 +0000, Carlos E. R. wrote:
>
>> I know, I know. But even so, there are two methods to connect to them on
>> W7: the Linux way (IPP), or the Windows way.
>
> Perhaps, but he’s using printer sharing on Windows 7, which is going to be
> SMB-based. So the easiest way to set it up is to use what’s already in
> place with that, and to use CUPS to access the smb:// URI for the printer.

Maybe it is easier, I don’t know. But Windows 7 also accepts printing
via IPP, and I think that is a better method. It is explained in one of
the links I posted. And I did so because I really think it is a better
method (based on what other people told me before), not for the sake of
arguing as you apparently think.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)