LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-03-2010, 05:06 AM   #1
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Rep: Reputation: 16
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!

Last edited by seflyer; 06-04-2010 at 09:31 AM.
 
Old 06-03-2010, 07:45 AM   #2
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.2 (multilib)
Posts: 1,232

Rep: Reputation: 59
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/
 
Old 06-03-2010, 07:53 AM   #3
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by arubin View Post
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?
 
Old 06-03-2010, 07:55 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,192

Rep: Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853
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'
 
1 members found this post helpful.
Old 06-03-2010, 08:28 AM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,286

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

Last edited by Richard Cranium; 06-03-2010 at 08:31 AM.
 
Old 06-03-2010, 08:35 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,599

Rep: Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702
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.
 
Old 06-04-2010, 09:39 AM   #7
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by michaelk View Post
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!

Last edited by seflyer; 06-04-2010 at 09:40 AM.
 
Old 06-04-2010, 09:57 AM   #8
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by allend View Post
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.
 
Old 06-05-2010, 09:33 PM   #9
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Original Poster
Rep: Reputation: 16
This thread seems dead... No one else has the same problem?
 
Old 06-05-2010, 09:55 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,599

Rep: Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702Reputation: 2702
The cups web interface in the printers section should have buttons to stop/start etc. Have you tried this yet?
 
Old 06-06-2010, 02:54 AM   #11
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
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.
 
Old 06-06-2010, 03:14 AM   #12
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
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.
 
Old 06-06-2010, 04:05 AM   #13
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
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#
 
Old 06-07-2010, 06:06 AM   #14
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Original Poster
Rep: Reputation: 16
The 'Paused' problem is solved by simply click on 'Resume' in CUPS web interface.
Thanks anyway, acummings!
 
Old 06-07-2010, 10:50 AM   #15
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lpq command do not display error for network printer managed by a Windows server powah Linux - Software 0 04-28-2009 08:18 AM
How do i add a printer on suse if the printer is connected to windows xp PC kumbahsam Linux - Newbie 7 09-18-2008 01:44 AM
Permissions: Can regular users add their network printer, like in windows ? frenchn00b General 0 03-08-2008 04:29 AM
samba print server for windows network, cannot save printer setting lnthai2002 Linux - Networking 0 07-25-2006 10:38 AM
How to add network printer? shadkong Linux - Networking 1 05-20-2005 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration