Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My machine runs Debian Linux (Etch); my wife's runs Windows 95 (and she insists that it stay that way). Both machines have ethernet cards and are connected. We share an Internet connection, using the Linux box as a gateway. Since this works, we want to share a printer. So, I installed Samba.
I can ping each machine from the other using IP numbers, but not names. Neither machine can "see" the other. I have no evidence that Samba has launched a network, and no evidence that the Windows machine has either. I call the workgroup, "WORKGROUP". For some reason, the Windows machine looks for "localdomaine".
I've read a ton of instructions, but they are all over my head. How do I test this to find out which end is the problem?
First off, which machine is the printer installed on? Windoze or linux? and does it print locally?
To fix the names issue, update on linux your /etc/hosts file and add entries for windoze and linux. Its been a while since I looked for a hosts file on windbloze, it is there somewhere, find it and update it as well. That should allow you to do the pinging with names.
Post your smb.conf file. Samba can be very involved, but for a simple home application, it doesn't have to be very complicated. Here is the best reference I have found. It tells you how to set up various flavours of windoze and how to set up linux, from simple to very complicated.
~$ nmblookup server
Server's Role (logon server) conflicts with share-level security
querying server on 204.174.36.255
querying server on 192.168.1.255
name_query failed to find name server
Where did it get those numbers? I didn't put them there. The second one is close, but not on. What's the security conflict.
The printer is presently attached to the Windows machine.
I ran your smb.conf file against the utility testparm, and it is suggesting security = share is in conflict with the other security lines you have. Those other lines look like you want security = user. Which is it?
I don't think you need the samba server running to print to the windoze printer. You would need samba client.
Where did it get those numbers? I didn't put them there. The second one is close, but not on. What's the security conflict.
Those numbers are broadcast addresses, note the .255 at the end. nmblookup is querying two sub-networks with a .255 address and can not find a name server. It won't find one, unless you have one.
The 204. subnet is probably the one going to your ISP, and the 192. one is the private sub-net to the windoze machine.
This thing tells us there is no name server found. You don't need one unless you have a lot of boxes sharing files. A name server will cut way down on network traffic in large networks.
This is a section from the smb.conf documentation explaining security = share. It is generally recommended to use security = user. You would have to create a user for the windoze user(s) to connect to the samba server, and add samba users using the smbpasswd command.
SECURITY = SHARE
When clients connect to a share level security server they need not log onto the server with a valid username and password before attempting to connect to a shared resource (although modern clients such as Windows 95/98 and Windows NT will send a logon request with a username but no password when talking to a security = share server). Instead, the clients send authentication information (passwords) on a per-share basis, at the time they attempt to connect to that share.
Note that smbd ALWAYS uses a valid UNIX user to act on behalf of the client, even in security = share level security.
As clients are not required to send a username to the server in share level security, smbd uses several techniques to determine the correct UNIX user to use on behalf of the client.
A list of possible UNIX usernames to match with the given client password is constructed using the following methods :
*
If the guest only parameter is set, then all the other stages are missed and only the guest account username is checked.
*
Is a username is sent with the share connection request, then this username (after mapping - see username map), is added as a potential username.
*
If the client did a previous logon request (the SessionSetup SMB call) then the username sent in this SMB will be added as a potential username.
*
The name of the service the client requested is added as a potential username.
*
The NetBIOS name of the client is added to the list as a potential username.
*
Any users on the user list are added as potential usernames.
If the guest only parameter is not set, then this list is then tried with the supplied password. The first user for whom the password matches will be used as the UNIX user.
If the guest only parameter is set, or no username can be determined then if the share is marked as available to the guest account, then this guest user will be used, otherwise access is denied.
Note that it can be very confusing in share-level security as to which UNIX username will eventually be used in granting access.
Hmmmm. I have never tried to print to a shared windows printer. I have an XP system at home with a Lexmark X83 multi-function printer - scanner. I have the X83 shared, I can print to it from other windoze machines, but not from linux. I did try last night to get it to print from linux, just to see if it was possible. The major problem I have is no driver for linux for the X83, so I can't test my theory on how to make it print. I also had a look for a how-to, but I haven't found anything good yet.
Here is what I think needs to be done.
On linux, install Cups if it is not already installed. I use the web interface to configure it, http://localhost:631 , ( I have a Lexmark 4039 attached to my linux system ). In cups as the administrator add a printer. You need to know some things, like the print driver for linux, URI etc. Once added, it should be able to print to the shared windoze printer. The device URI looks after setting up the connection to windoze for printing.
To figure out what driver, go to www.linuxprinting.org and look up the make and model of the printer. That is about the best place to get driver information on printers. If there is no driver, you may be out of luck.
I did some more scratching around and found this how-to on in the tutorial section. Have a look, it gives you the big picture for a HP laser jet printer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.