LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-15-2004, 01:13 PM   #1
troycus
Member
 
Registered: Sep 2003
Posts: 84

Rep: Reputation: 15
network printer setup


I just installed and configured my new epson printer. It works great with linux. My problem is, I trying to set it up so that my windows machine can use it, also. I have my samba server set up. I'm having trouble understanding how to set up the network. Any help wold be appreciated.
 
Old 02-15-2004, 03:48 PM   #2
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
There are a variety of issues with setting up networking under Linux.
It could even be said that there are details that vary by Linux distro,
and I can certainly say that I have felt that I've had to take different
approaches to MS-Windows <==> Linux connectivity when different
versions of MS-Windows were involved. As I am viewing your post,
you don't appear to have mentioned either the Linux distro(s) that you
are using, or the version(s) of MS-Windows. Maybe some general
questions would help:

* What is your present level of connectivity? For example, can you ping
your MS-Win machine from Linux by IP address, or Linux from MS-Win?
* When you say you have your Samba server set up, do you mean *only*
that it is running, and it is not configured? Or do you mean that you
tried to configure it, but the configuration doesn't seem to work?
* Are you trying to manually configure your Samba server by editing
the configuration files, or are you using some sort of configuration
tool such as "swat" ?
* Are you running CUPS for printing and thus perhaps can make use of
something like "cupsaddsmb" ?
* When you try to add the Linux printer to your MS-Win environment from
MS-Win, can you see the Linux printer from MS-Win ? If it appears in
a list of printers to choose from in MS-Windows, you might have a "security"
issue. In certain circumstances, I have found that you can't configure access
issues using host names, you have to use IP addresses or address ranges.

Basically, we need the details...
 
Old 02-15-2004, 10:04 PM   #3
troycus
Member
 
Registered: Sep 2003
Posts: 84

Original Poster
Rep: Reputation: 15
Sorry for not giving more details. Here they go:


I'm using Redhat 9.0 and Windows XP Perfessional . I have samba setup on linux and it's running fine. I can ping the 2 computers. The printer works on Linux with no problem. I'm trying to get windows xp to be able to use it also. My linux box is my main computer. eveything filters through linux.
 
Old 02-15-2004, 11:59 PM   #4
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
I gathered that you had your printer on Linux, and that you wanted windows to
access it. Now we know the Linux distro and some idea of which version of MS-Win
you are using, and that you can ping back and forth between the two machines.
But you still keep using the term "setup" for your Samba server. You don't necessarily
just *start* your Samba server running. You almost always need to do some
configuration to tell it what to "serve" for MS-Win. What have you done to tell the
Samba server which printers are to be available to MS-Windows XP and with what
names?
 
Old 02-16-2004, 05:50 AM   #5
bobgodwinx
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
hi troycus ,
well l did'nt understand clearlly your question but from what l could
get l see you have problems in geting windows XP work with linux 9.0

1) you may have problems with the firewall setup that may be bloccing the windows xp from seeing the linux box?
if so you can do a secure input into the linux box with the mac-address of
your windows xp netcard e.g let's say your windows xp mac address is
00:05:23:12:QW:12 you can do this

[root@localhost root]# iptables -I INPUT -i eth0 -m --mac-source 00:05:23:12:QW:12 -j ACCEPT

2) you may not have the windows xp user on the linux box the in this case
you also have to add the samba user like this

[root@localhost root]# useradd troycus
[root@localhost root]# passwd troycus password
[root@localhost root]# smbpasswd -a troycus password
[root@localhost root]# smbpasswd -e troycus password

3) you may be having problems of inpretation from windows xp machine
then you can simply do this in windows xp

open the regedit
click HKEY_LOCAL_MACHINE
click SYSTEM
click CurrentControlSet
click Services
click lanmanworkstation
then here in lanmanworkstation make a right click select NEW then select
VALUE DWORD make a clic and give a new name like this EnablePlainTextPassword then give the hexadecimal value 1 by default it's 0 but you just have to change it to 1
reboot you windows xp to save changes

hope you would'nt have any problem
but you do just e-mail me bobgodwin@virgilio.it
cheers
 
Old 03-01-2004, 10:20 AM   #6
sio
Member
 
Registered: Jul 2003
Location: Louisiana, US
Distribution: Slackware
Posts: 129

Rep: Reputation: 15
what in the world are you people talking about?!? First of all theres no need to change your windows box to NOT use encrypted passwords. If he has a samba file/folder share he can simply turn on encrypted passwords using SWAT.

As for what your actually asking I am currently trying to do the same thing so if anyone has any real advice about how to share a printer using samba then please feel free to let us know. I'm running slackware 9.1 with samba upgraded to 3.0.x something or another, dont remember exactly.

Anyway this is what i speculate and am looking at. As you may already know, everything within linux is a file. So somewhere on the computer when you added your epson printer it created a physical file. When you print something it dumps it to this file. You'll also notice when you click the printer button under SWAT and type in a name to share a printer, theres a place to type in the location of that file. I have no clue how the win box is supposed to know what drivers to use so i doubt this method would work unless it just sent it RAW.

Anyway im trying to share the default pdf printer that comes with KDE. Did you setup the printer up using KDE or did you use CUPS? Ill look into it but i believe the matter of sharing a printer setup in CUPS is supposed to be trivial ( as all things are right? )
 
Old 03-01-2004, 06:42 PM   #7
troycus
Member
 
Registered: Sep 2003
Posts: 84

Original Poster
Rep: Reputation: 15
Thank you!!! Someone understands what I'm trying to do!!!!!! To answer your question, I'm using the Gnome desktop and the cups program for my printing. How is using slackware, compared to Red Hat?
 
Old 03-02-2004, 02:42 AM   #8
bobgodwinx
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
Dearest sio,
thanks very much for your reply l was only trying to help TROYCUS to get his printers well configured in the win XP remember that most people
don't really know how to configure samba and if someone is using the older
version of samba like samba-2.2.7a you still need to change your windows box if the encrypted passwords options is off and from experience mmost people turn it off. So in order to get the printers get working faster you just do the change in the windows box and configure the printers with the normal driver from the installation cd or default drivers in the XP box .
 
Old 03-02-2004, 05:56 AM   #9
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
Hi troycus,

You need to help people help you. There isn't necessarily one way to do things.
People need the details of your environment, what steps you have taken. On Feb
15th, I asked you things such as:

* Are you using CUPS?
* Are you using SWAT?

When you responded, you did NOT answer those questions. Now, over two weeks
later, we discover that you are using CUPS. You still haven't actually said whether or
not you are using SWAT. If you are using SWAT, it should make things a good
deal easier. sio said "i believe the matter of sharing a printer setup in CUPS is
supposed to be trivial", and indeed one way to do that which is supposed to be fairly
easy, is with the "cupsaddsmb" command that I mentioned back on Feb 15th. If
you have installed a complete selection of software for CUPS and Samba you should
probably have the "cupsaddsmb" command. If for some reason you do not have the
"cupsaddsmb" command, then for example please consult:

http://www.linuxforum.com/man/cupsaddsmb.8.php

Notice in that, a certain minimal version of Samba is required ( a detail ).
I have heard one person claim that as recently as November, he thought he had some
password issue using that command on Red Hat. I have heard no confirmation
that it was an actual problem and not just a misunderstanding. However, I am using
CUPS, and configuring Samba with SWAT so that I can use a Linux based printer
from Win XP, and I haven't had much of a problem setting it up. If you want something "simple", "cupsaddsmb" is supposed to be simple.

Again, there isn't just one way to do things. If I were to provide you with my
configuration files, even apart from changing names and addresses, if you
approached things in a different way from the way I did, they still might not
work for you. Also, there may be factors in your environment, that would
prevent you from approaching things the same way I did.

At a high level what I did was like this ( using SWAT when working with Samba ):

* Put both machines on the same LAN and verify connectivity by making sure I can
ping from one machine to the other in both directions.
* Put the XP system in a particular work group
* Set up Samba to be in that same workgroup.
* Share the Linux printer from Samba
* On Linux, restart the "netbios" name service daemon and then the Samba daemon
* Make sure the Linux printer appears in the list of printers from XP
* Add the printer to XP
* I tried different settings for Samba, especially when it came to whether or not to use
the "client driver", and reset the daemon after changes, but no matter what I tried, XP
decided the "proper" printer driver was not present on the server, so I added the
driver to XP, and configured Samba to use the client driver
* Make sure I can access the printer from XP

Beyond all that, when I was finished, some of the major settings from SWAT to
accomplish this were:

security=SHARE
log level=9
guest account=nobody
guest ok=Yes
hosts allow=X.Y.Z.0/255.255.255.0
printable=Yes
Browseable=Yes

where X.Y.Z were actually the proper octets for my LAN.

Hope this helps. If it doesn't, then PLEASE give us details of what you did differently,
so you can help us, help you. For example, are you even using SWAT? If you can
give be more detailed with us, we can be more detailed with you. Otherwise, we're
just wasting time guessing at what you are doing...
 
Old 03-02-2004, 07:16 AM   #10
troycus
Member
 
Registered: Sep 2003
Posts: 84

Original Poster
Rep: Reputation: 15
kakaka,

Thank you for you help, kakaka. It appears that bobgodwinx understood what I needed done with the "little" information I gave. He got the concept and gave sound advice. The information you gave was incorrect. In my first post I said, "I have samba setup on linux and it's running fine". bobgodwinx was right. He said, just do the change in the windows box and configure the printers with the normal driver from the installation cd or default drivers in the XP box . My printer is working on both boxes now.

Thanks.
 
Old 03-02-2004, 09:15 AM   #11
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
troycus,

Actually, the information I gave was correct, but not applicable to your situation.

You are not quoting yourself accurately. In your first post you said "I have my samba set up". In your second post you said "I have samba setup on linux and it's running fine. Even then, the statement "I have samba setup on linux and it's running fine" is ambiguous. "running fine" could merely mean that it does not crash. That's why I kept
trying to get you to talk about the Samba configuration you had established, if any. In
my situation, I did nothing of what bobgodwinx suggested, but easily allowed my Linux
printer to be used from XP.

Regardless, I'm glad that what bobgodwinx said was applicable to your situation
and your printer is now usable from XP.

Cheers.
 
Old 03-02-2004, 09:44 AM   #12
troycus
Member
 
Registered: Sep 2003
Posts: 84

Original Poster
Rep: Reputation: 15
Your right kakaka. I have to be more clear when post threads. I sometimes asume eveyone knows what i'm talking about. know harm intended.
 
Old 03-04-2004, 11:02 AM   #13
sio
Member
 
Registered: Jul 2003
Location: Louisiana, US
Distribution: Slackware
Posts: 129

Rep: Reputation: 15
right so anyways *rolls eyes* now that we are all on the same level ...

First off you ask about slackware compared to redhat. That can be a lengthy discussion so ill just sum up WHY i use slackware and not redhat, mandrake, suse, etc.

1. Total Control - I have full awareness about anything and everything I do on my system. What? Yes you can have the same awareness with other distros but frankly I find it more difficult. Everything is kept in mostly logical places and kept simple. Mostly when you start automating things you start moving things to illogical places and start making weird work arounds. In Example: Suse 9.0 Fresh install, im trying to setup it up using two network cards one connect to broadband connection the second a private network. Bridge the connections and setup a basic firewall service just to keep the kiddies out. So I use the setup wizards to accomplish this but apparently the dhcpdc ( client to receive IP from dhcp server ) for eth0 automatically overwrites the dhcpd.conf which means that eth1 is not assigning IP's <-- example of doing weird things to make it automated.

2. Package Management - The slackware packagemanagement is a godsend i swear. True enough it has proven to be a pain in the ass but all in all i find the rpm package management solution a bigger pain. More time is invested when installing an rpm packaged program [edit: actually i meant this in reference to installing an rpm based package ON SLACKWARE, just to clarify], thatis: using the utility rpm2tgz i then need to create a proper install script to put into the newly created slackpackage so that if i desire to uninstall it in the future it actually uninstalls. This compared to doubleclicking an rpm package and it updates dependencies ( or its supposed to, in my experience i've run into more problems with this than i have with pkgtool [the slackware package manager]). And of course this goes back to point number one. After all this i am fully aware of what im putting on my computer, etc.

3. Slackware seems to run a hell of a lot faster than other distros. I mean this whole heartedly. I'm a speed demon and notice little things like this.

There's really only one con that is the priced to be paid for the first two points. Thats configuring a newly installed program. Say after a fresh install you told it during setup to start samba by default and to start mysql by default. Well on your first bootup samba isn't going to work and mysql will open and then close. Why? You have to type out a samba configuration file and initialize mysql so it actually starts. *wide smile* Or if you say installed the slackware package of wine, does it work after installing? no. You have to setup everything up by hand ( if you want it easier you generally just download the source which provides automated installs and default configs etc ). Though this takes up time its what leads to why i like slackware, *refers to point one* So you might get the feeling that the package management and the sheer responsiveness of the system and what those things lead to are just a few reasons why people use slackware.

I just want to say that I'm not bashing Suse above or any other distro, yes there is a workaround for the above thing i stated. I whole heartedly believe in the basic philosophy that drives each of the companies, its just going to be a while longer before they get there. I'd love the RPM package management in a lot of situations if it worked 99% of the time.

Slackware will always just be slackware though IMHO. And I truly look foward to these other distros pushing foward and innovating and making easy and in the future hope I can contribute to these efforts.

Anyway I've been busy at work and managed to take some time and I got a pdf printer shared with samba, woot!

Concerning the comment about encrypted passwords, you shouldn't need to worry about this unless you want someone to log in to the linux box. IE: they type

\\myredhatbox

and get prompted for a username and password. If this is how you are going to setup samba then yes you would need to turn on encrypted passwords. In samba 2.2.x and 3.0.x it is turned off by default. But nevertheless people here are solving problems that dont exist yet. He wants to share a printer so lets help him share a printer ( I dont want to step on any toes but im sure I will be -- *glances at his news ticker* microsoft funds SCO 86 million O.o big surprise ).

ON TO THE PRINTING!

cupsaddsmb -- sounds like something i've heard of before and will look into it in a couple days as ill need to be sharing a physical printer from this box soon but sounds like something you can google for or kakaka could perhaps post any knowledge he has of how it works. Im guessing it just adds the appropriate lines to the smb.conf you restart the samba service et voila. Sounds easy enough.

First off if you dont have SWAT up and running then go ahead and figure out how to get it working in redhat. I'd imagine its on by default though, maybe. In slackware if memory serves right simply uncomment the line containing swat in /etc/inetd.conf and then restart the inetd daemon or reboot your computer.

To access swat open up galeon ( im not overly familiar with gnome so forgive any ignorance i show with it ) and head to http://localhost:901/

On some of the more automated distros SWAT is generaly already on AND using ssh. So if you go to that address and get nothing you might need to do a secure http connection as follows

https://localhost:901/ <-- Notice the extra 's'

Now that your in SWAT click on the printers tab. Firstly i would check and see if there are any printers already in it b/c supposedly it initially grabs any printers listed in/by your printcap. ( Printer Knowledge is a weak point for me, dont know alot about printcap ). If so see if they work or look and see what the lpr, lprm and print commands are in them for future hacking around. See if they work.

If there are not printers listed then type a name in the empty field and click create printer. Hit the advanced button and scroll down the page. You'll see a print command an lpr and lprm space. Now we just need the correct command line options in those three spaces. The cupsaddsmb would certainly put the right command line options in these three spaces but in case something weird happens and it writes it to the wrong file or you want to create the printers manually just see what the commands are word for word. Next would be client setup and testing to see if all the things you did even work. Here's is an article

http://www.linuxgazette.com/node/view/2054

I used tidbits of information from it to setup a pdf printer though i didn't use the script file i took a different approach to creating the pdf. Something you may find of interest though is at the end. As you may already know when you share a printer in windows and then add that printer to another windows client through the first client itll get the drivers from the first client. [ADD NETWORK PRINTER--BROWSE FOR PRINTER--HP LASERJET--INSTALL NETWORKED DRIVERS FROM WINDOWSMACHINE1? YES--NOW READY FOR YOU] Gives you an idea if you dont know what im talking about.

Well i dont know if that neato cups command adds does the appropriate things to ensure that the driver will be automatically downloaded by the client but by default that doesn't happen. Towards the end of the guide for the link i posted it instructs you on how to do this. Mostly though im sure there's some sort of neat button you can click in redhat that makes it or breaks it. Or some nice feature of CUPS of equal value.

So I would say look into the cupsaddsmb command and if it gives you trouble or theres something you want to do look back at this post for a few hacks or of course google. If you still have trouble, list the problem and we'll see if we can figure it out.

-- Daniel

Last edited by sio; 03-04-2004 at 11:05 AM.
 
  


Reply



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
Newbie trying to setup network printer on suse 9.2 zachthegeek Linux - Networking 5 04-03-2005 11:34 PM
Network Printer Setup on Slackware 9.1 seagoj Linux - Networking 1 04-03-2004 05:18 PM
How to setup network printer in mandrake ? futurist Linux - Hardware 4 03-25-2004 02:00 AM
setup printer on client machine(slackware 8) to server (slackware7) network printer changwoo Slackware 9 05-02-2003 05:37 PM
network printer setup problems! yenonn Linux - Newbie 3 03-12-2003 11:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:31 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
Open Source Consulting | Domain Registration