LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to add a network Windows printer server? (https://www.linuxquestions.org/questions/slackware-14/how-to-add-a-network-windows-printer-server-811885/)

seflyer 06-03-2010 05:06 AM

How to add a network Windows printer server?
 
I am running Slackware 13. There is a printer in my local network. I want to use it, so I checked online, and here seems to be the answer(the installation of CUPS does have smb backend):

Code:

/usr/sbin/lpadmin -p RicePrinter -v smb://fred:mypass@rice/INKJET -P /root/inkjet.ppd
/usr/bin/enable RicePrinter
/usr/sbin/accept RicePrinter
/usr/sbin/lpadmin -d RicePrinter

If I understand correctly, 'RicePrinter' is the name I've chosen for the printer; 'inkjet.ppd' is something related to format used for printing, the driver will use it to instruct the printing job. 'accept' is for accept a job and 'lpadmin -d' is to set the default printer.

Here are the problems:
1. I have done the first command, namely the '/usr/sbin/lpadmin -p' one, with no problem; But when trying the second one, typing '/usr/bin/enable' returns '/usr/bin/enable: no such file'; I then try 'enable RicePrinter', it returns 'enable RicePrinter: not a shell builtin'.
Then typing 'type -a enable', it tells me that 'enable is a shell builtin'. The last two commands are of no problem. Then what the system wants to say after all?
I have checked the printer configuration with 'lpstat -p', it shows 'printer RicePrinter disabled since BlahBlah, reason unknown', so it may indeed be caused by the problem from the 'enable' step. How to enable the printer?
2. Unless the 'enable' step asks for a driver, I am wondering why there is no such step as choosing a driver from a list or so.

Any ideas? Thanks in advance!

arubin 06-03-2010 07:45 AM

Can you not try doing this through Cups administration via web browser? I am not sure of the address from memory - something like:

localhost:631/

seflyer 06-03-2010 07:53 AM

Quote:

Originally Posted by arubin (Post 3991224)
Can you not try doing this through Cups administration via web browser? I am not sure of the address from memory - something like:

localhost:631/

Oh, that was my first try. But I guess that is for adding printer connected with a Linux OS, no?

allend 06-03-2010 07:55 AM

A few things to check:
Have you got the cupsd daemon running? 'ps ax | grep cupsd' should show /usr/sbin/cupsd. This daemon can be started at boot by making /etc/rc.d/rc.cups executable.
I prefer to use the web interface to the CUPS server to setup and administer CUPS. Just type 'http://localhost:631' into your browser's address bar to do this. Try the Find New Printers button on the Administration tab.
I think you do not have your device URI correct.
Quote:

smb://fred:mypass@rice/INKJET
I think this should be 'smb://fred:mypass@<your Windows Workgroup>/rice/INKJET' if the server name is 'rice' and the printer name is 'INKJET'

Richard Cranium 06-03-2010 08:28 AM

[Edit: Contents solving the wrong problem, so I removed it.]

michaelk 06-03-2010 08:35 AM

FYI: lpadmin is the command line utility but you can also configure printers via the cups web interface and would be much easier for the beginner to use.

You do realize the commands you posted was just an example from the howto and you need to replace rice with the actual hostname or IP address of the windows computer that is attached to the printer.

seflyer 06-04-2010 09:39 AM

Quote:

Originally Posted by michaelk (Post 3991277)
FYI: lpadmin is the command line utility but you can also configure printers via the cups web interface and would be much easier for the beginner to use.

You do realize the commands you posted was just an example from the howto and you need to replace rice with the actual hostname or IP address of the windows computer that is attached to the printer.

Yes, I did...
Here is the information in the web interface, the printer did exist, no?
Code:

labprinter (Paused, Accepting Jobs, Shared, Server Default)
Description:        labprinter
Location:       
Driver:        Local Raw Printer (grayscale)
Connection:        smb://202.***.**.**/hpLaserJ
Defaults:        job-sheets=none, none media=unknown

I just use stars instead of real numbers there, you know, for security concerns.
We can see that it is 'Paused'.
As I said, the 'enable' step failed, I guess this might be the reason. So at least one of the questions here is how to get the 'enable' thing work...
Thanks!

seflyer 06-04-2010 09:57 AM

Quote:

Originally Posted by allend (Post 3991234)
A few things to check:
Have you got the cupsd daemon running? 'ps ax | grep cupsd' should show /usr/sbin/cupsd. This daemon can be started at boot by making /etc/rc.d/rc.cups executable.

Yes, the cupsd daemon is running.
Quote:

I prefer to use the web interface to the CUPS server to setup and administer CUPS. Just type 'http://localhost:631' into your browser's address bar to do this. Try the Find New Printers button on the Administration tab.
'Find new printers' returns "no printers found".
Quote:

I think you do not have your device URI correct.

I think this should be 'smb://fred:mypass@<your Windows Workgroup>/rice/INKJET' if the server name is 'rice' and the printer name is 'INKJET'
Thanks, I forgot that. I added the name of the workgroup, (in fact, I had used the ip address, so this might not be a problem?), the problem is still there.

seflyer 06-05-2010 09:33 PM

This thread seems dead... No one else has the same problem?

michaelk 06-05-2010 09:55 PM

The cups web interface in the printers section should have buttons to stop/start etc. Have you tried this yet?

acummings 06-06-2010 02:54 AM

Hi,

I, at times, do run the next (below enclosed about) Samba. But I've not yet actually done the **Cups via smb** (Samba). But I hope that soon I'll have the time to do a

**Cups via smb to a Windoze printer.**

And that above is what I believe that you need to do.

The remainder of my post shares a screenshot picture as well as what I know about or on this topic.

I'm nearly, if not certain, that you need or must have the Samba server running. And you'll need an smb.conf file (for Samba) with appropriate permissions (by default it very most probably is far far too secure to allow you to do what you want).

Hit me up if you want a VERY_INSECURE smb.conf file (good *only* for use on a secure and trusted lan or network)

What we do here is we access (and use) an M$ Windoze printer. We do so with Cups via smb (Samba) to said printer.

Next is a screenshot (also see steps enclosed below)

http://spiffyminer.tripod.com/screen_cups.htm

1. localhost:631

did localhost:631 in my Firefox web browser address field

2. clicked on "add printer"

3. filled in the three fields (test_win_smb for name, etc.)

4. clicked "continue"

5. now we're at my as per my above listed screenshot page where I clicked on the little down pointing arrow or triangle (refer to my screenshot picture). That mouse click brought up a lengthy list of different types of devices. I chose the most appropriate type of device (again, see my screenshot which displays my choice).

6. click "continue"

At this time, I went no further because I don't yet have a Windoze printer. (I've four Linux//Cups printers on my network that work adequately for me)

Alan.

acummings 06-06-2010 03:14 AM

Quote:

Can you not try doing this through Cups administration via web browser? I am not sure of the address from memory - something like:

localhost:631/
Oh, that was my first try. But I guess that is for adding printer connected with a Linux OS, no?
I think that it *is* for what you want to do given if you choose the particular type of device that you have in your situation. (see my screenshot in my former post for the chosen type of device).

The next two (grep smb and the grep nmb) commands their output here, in this case, tells me that my Samba is running. (yours Samba will need be running and you'll need a smb.conf that allows you to do what you want to do)

al@P5Q:~$ ps aux | grep smb
root 3907 0.0 0.0 11756 2864 ? Ss 01:03 0:00 /usr/sbin/smbd -D
root 3910 0.0 0.0 11756 1148 ? S 01:03 0:00 /usr/sbin/smbd -D
al 3914 0.0 0.0 2084 636 pts/1 R+ 01:03 0:00 grep smb


al@P5Q:~$ ps aux | grep nmb
root 3909 0.0 0.0 7076 1672 ? Ss 01:03 0:00 /usr/sbin/nmbd -D
al 3916 0.0 0.0 2084 636 pts/1 R+ 01:03 0:00 grep nmb
al@P5Q:~$

Alan.

acummings 06-06-2010 04:05 AM

Insecure,

for protected//safe//trusted lan or network use only

And you may also need some sort of "allow cups" statement in the smb.conf too so that cups can be allowed to go out through smb so as to ultimately print to the Windoze printer.

Code:

root@P5Q:/etc/samba# pwd
/etc/samba
root@P5Q:/etc/samba# ls -la
total 28
drwxr-xr-x  3 root root 4096 2009-06-25 20:50 ./
drwxr-xr-x 67 root root 4096 2010-06-05 23:49 ../
drwx------  2 root root 4096 2009-06-25 20:49 private/
-rw-r-----  1 root root 1562 2009-02-03 21:55 smb.conf
-rw-r--r--  1 root root 9672 2009-06-25 20:50 smb.conf-sample


root@P5Q:/etc/samba# cat smb.conf
# This is the main Samba configuration file.
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
workgroup = WORKGROUP
cups options = raw
map to guest = Bad User
domain master = no
restrict anonymous = no
preferred master = no
max protocol = NT
server signing = Auto
domain logons = no
local master = yes
passdb backend = smbpasswd
netbios name = SW122_SMB
encrypt passwords = yes

[home_al]
path = /home/al
read only = no
force user = root
force group = root
guest account = root
case sensitive = no
guest only = yes
guest ok = yes
browseable = yes
printable =no

# [mnt_dat_sda8]
# path = /mnt/dat_sda8
[mnt_sda_8]
path = /mnt/sda_8
read only = no
force user = root
force group = root
guest account = root
case sensitive = no
guest only = yes
guest ok = yes
browseable = yes
printable =no
root@P5Q:/etc/samba#


seflyer 06-07-2010 06:06 AM

The 'Paused' problem is solved by simply click on 'Resume' in CUPS web interface.
Thanks anyway, acummings!

acummings 06-07-2010 10:50 AM

That's where your management is accomplished.

If you ever need to cancel a print job, here's the place to do it.

Setup and also management of printer(s).

Glad you got it working.

Alan.


All times are GMT -5. The time now is 04:42 AM.