LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-05-2006, 03:26 PM   #1
cougyr
Member
 
Registered: Nov 2003
Posts: 98

Rep: Reputation: 15
Printer sharing with Win 95


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?
 
Old 11-06-2006, 08:44 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

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

http://us1.samba.org/samba/docs/using_samba/toc.html
 
Old 11-06-2006, 10:18 AM   #3
cougyr
Member
 
Registered: Nov 2003
Posts: 98

Original Poster
Rep: Reputation: 15
Here's my smb.conf:

Quote:
[global]
server string = %h server (Samba %v)
security = SHARE
encrypt passwords = No
obey pam restrictions = Yes
passdb backend = tdbsam
guest account = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
domain logons = Yes
dns proxy = No
panic action = /usr/share/samba/panic-action %d
invalid users = root

[homes]
comment = Home Directories
create mask = 0700
directory mask = 0700
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
guest ok = Yes

[/tmp]
comment = temporary files
path = /tmp
guest ok = Yes
 
Old 11-06-2006, 10:23 AM   #4
cougyr
Member
 
Registered: Nov 2003
Posts: 98

Original Poster
Rep: Reputation: 15
nmblookup does this:

Quote:
~$ 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.
 
Old 11-07-2006, 09:10 AM   #5
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

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

Last edited by camorri; 11-07-2006 at 09:27 AM.
 
Old 11-07-2006, 09:27 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
Quote:
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.
 
Old 11-07-2006, 09:42 AM   #7
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
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.
 
Old 11-07-2006, 10:45 AM   #8
cougyr
Member
 
Registered: Nov 2003
Posts: 98

Original Poster
Rep: Reputation: 15
Thanks. I changed to security = user. I have smbclient. I'll concentrate on printing to the Windoz machine for the time being. Any hints?
 
Old 11-08-2006, 09:29 AM   #9
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

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

Hope this helps.
 
Old 11-08-2006, 09:39 AM   #10
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

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

http://www.linuxquestions.org/linux/...P_Pro_via_CUPS

Hope this helps.
 
  


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
Printer-sharing with FreeBSD; cannot se icon for the printer hemmelig *BSD 7 05-13-2005 03:44 PM
sharing printer with win 98 egyptian Linux - Networking 1 09-23-2004 12:22 PM
how to get primary logon network, Access control,File sharing & printer sharing info dileepkk Linux - Networking 2 07-06-2004 06:54 AM
Printer sharing betw Mandrake & Win ME Ishkabibble Linux - Networking 3 09-05-2003 12:00 PM
Sharing Partitions between RH and Win Smooth Linux - Newbie 3 07-26-2003 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:48 AM.

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