LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2004, 01:21 PM   #1
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
Sharing linux printer with XP box on network


I have tried to pour through the threads to find an answer to this, but simply cannot.

I have an epson printer connected to my fedora core 1 box, works fine. I went into the printer settings (via the GUI) and selected the printer, clicked the file menu (or whatever the first menu is, I'm not at my linux box now to be exact) and selected sharing. I then enabled sharing for anyone, saved the configuration. The printer is located at /dev/lp0.

From my XP box, I cannot see the printer (or anything else on my linux box except for the localhost in the workgroup, which I cannot browse) and obviously cannot connect to it. I go to "add printer" then choose network printer, then type "\\192.168.1.101\" and click browse, and it is not able to find anything or browse the machine at all.

My issue is, I can't seem to find any info regarding how to set this up and get it to work. I'm having a stressful day at work, so I apologize for the lack of clarity and poor english. I cannot even think of what files to show the contents of here for somebody to help.

So, what do ya'll need to see to help me out? Let me know and I'll post them.

Thanks in advance...
 
Old 04-09-2004, 01:33 PM   #2
NarutoKun
Member
 
Registered: Jan 2004
Location: Puchong, Selangor, Malaysia
Posts: 38

Rep: Reputation: 15
Look up the topic Samba (smb). For a M$ Windows machine to use a share printer from other OSes you need samba.

Since you have GUI. You may wanna try out SWAT - Samba Web Administration Toolkit. But.... most probably the service would have been disabled. Check your xinetd configuration for SWAT and enable it b 4 trying 2 use it.

Cheers.
 
Old 04-09-2004, 02:12 PM   #3
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Original Poster
Rep: Reputation: 30
I have samba running, and am able to not only browse the XP box, but mount it as well. I just can't in anyway see anything on my linux box from my windows machine.

I understand that windows wont be able to read an ext2 or ext3 drive (right? or am I mistaken?), but I SHOULD be able to share the printer, shouldn't I?

Never used SWAT, but is it still applicable since I konw I have samba up and running? If so, how the heck do I use SWAT? Doesn't it have something to do with one of the ports needing to be open? Then do I (judging by the name) have to configure it via the web?

Thanks for helping, let me konw what you think...
 
Old 04-09-2004, 03:04 PM   #4
NarutoKun
Member
 
Registered: Jan 2004
Location: Puchong, Selangor, Malaysia
Posts: 38

Rep: Reputation: 15
First of all, by being able to browse the windows machine doesn't mean that u have samba server up. U only have samba as a client. U need samba server to serve your shares to other windows users. And yes u r mistaken. When sharing a filesystem through samba filesystem the client (windows) will just see that it is a share drive and able to save to that drive no matter what is the underlaying filesystem (ext2,ext3,HFS, JFS, etc) - its a transparent filesystem.

Here are the steps 2 use SWAT.
vi /etc/xinetd.d/swat
(change the disable = yes to disable = no)
then run
service xinetd restart
open up mozilla and type
http://localhost:901/

Cheers.
 
Old 04-09-2004, 03:21 PM   #5
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Original Poster
Rep: Reputation: 30
I guess I'm showing my "newbiness" today, huh?

One problem. Well, perhaps two, but definately at least one...

When I type service xinetd restart (as root) it tells me command not found.

Shall I just go into the services GUI (redhat menu, system tools, server settings, services) and restart it from there once I get home? Is there another way to restart it from command line?

Second, swat was already enabled (that is, it already said "disabled = no" in /etv/xinetd.d/swat), but I have never tried to config it using a browser. I shall do that as soon as I get home, after which I will post again to update on the status. Hopefully I'll have good news for myself...

Can't thank you enough for your assistance...
 
Old 04-09-2004, 07:42 PM   #6
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Original Poster
Rep: Reputation: 30
Okay. I got home and went to the http://localhost:901/, which worked, logged in as root, and configured (to the best of my knowledge) it to hsare the printer /dev/lp0. While I was there I also set up a share for my home directory with the hopes that I'd be able to see it from the windows box.

NO SUCH LUCK>

Winblows still responds the same...unable to browse the linux box in any way or find the printer.

Sorry to get so long, but here is the FULL output of the new config after the SWAT changes:

------------------------------------------------------------------------------------------

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2004/04/09 18:29:59

# Global parameters
[global]
dos charset = CP850
unix charset = UTF-8
display charset = LOCALE
workgroup = WORKGROUP
realm =
netbios name = LOCALHOST
netbios aliases =
netbios scope =
server string = samba_server
interfaces =
bind interfaces only = No
security = USER
auth methods =
encrypt passwords = Yes
update encrypted = No
client schannel = Auto
server schannel = Auto
allow trusted domains = Yes
hosts equiv =
min passwd length = 5
map to guest = Never
null passwords = No
obey pam restrictions = No
password server = None
smb passwd file = /etc/samba/smbpasswd
private dir = /etc/samba
passdb backend = smbpasswd
algorithmic rid base = 1000
root directory =
guest account = jeff
pam password change = No
passwd program =
passwd chat = *new*password* %n\n *new*password* %n\n *changed*
passwd chat debug = No
passwd chat timeout = 2
username map = /etc/samba/smbusers
password level = 0
username level = 0
unix password sync = No
restrict anonymous = 0
lanman auth = Yes
ntlm auth = Yes
client NTLMv2 auth = No
client lanman auth = Yes
client plaintext auth = Yes
preload modules =
log level = 0
syslog = 1
syslog only = No
log file = /var/log/samba/%m.log
max log size = 50
timestamp logs = Yes
debug hires timestamp = No
debug pid = No
debug uid = No
smb ports = 445 139
protocol = NT1
large readwrite = Yes
max protocol = NT1
min protocol = CORE
unicode = Yes
read bmpx = No
read raw = Yes
write raw = Yes
disable netbios = No
acl compatibility =
nt pipe support = Yes
nt status support = Yes
announce version = 4.9
announce as = NT
max mux = 50
max xmit = 16644
name resolve order = wins lmhosts bcast
max ttl = 259200
max wins ttl = 518400
min wins ttl = 21600
time server = No
unix extensions = Yes
use spnego = Yes
client signing = auto
server signing = No
client use spnego = Yes
change notify timeout = 60
deadtime = 0
getwd cache = Yes
keepalive = 300
kernel change notify = Yes
lpq cache time = 10
max smbd processes = 0
paranoid server security = Yes
max disk size = 0
max open files = 10000
socket options = TCP_NODELAY
use mmap = Yes
hostname lookups = No
name cache timeout = 660
load printers = Yes
printcap name = /etc/printcap
disable spoolss = No
enumports command =
addprinter command =
deleteprinter command =
show add printer wizard = Yes
os2 driver map =
mangling method = hash2
mangle prefix = 1
stat cache = Yes
machine password timeout = 604800
add user script =
delete user script =
add group script =
delete group script =
add user to group script =
delete user from group script =
set primary group script =
add machine script =
shutdown script =
abort shutdown script =
logon script =
logon path = \\%N\%U\profile
logon drive =
logon home = \\%N\%U
domain logons = No
os level = 255
lm announce = Auto
lm interval = 60
preferred master = Auto
local master = Yes
domain master = Auto
browse list = Yes
enhanced browsing = Yes
dns proxy = Yes
wins proxy = No
wins server =
wins support = Yes
wins hook =
wins partners =
kernel oplocks = Yes
lock spin count = 3
lock spin time = 10
oplock break wait time = 0
ldap suffix =
ldap machine suffix =
ldap user suffix =
ldap group suffix =
ldap idmap suffix =
ldap filter = (uid=%u)
ldap admin dn =
ldap ssl =
ldap passwd sync = no
ldap delete dn = No
ldap replication sleep = 1000
add share command =
change share command =
delete share command =
config file =
preload =
lock directory = /var/cache/samba
pid directory = /var/run
utmp directory =
wtmp directory =
utmp = No
default service =
message command =
dfree command =
get quota command =
set quota command =
remote announce =
remote browse sync =
socket address = 0.0.0.0
homedir map = auto.home
afs username map =
time offset = 0
NIS homedir = No
panic action =
host msdfs = No
enable rid algorithm = Yes
idmap backend =
idmap uid =
idmap gid =
template primary group = nobody
template homedir = /home/%D/%U
template shell = /bin/false
winbind separator = \
winbind cache time = 300
winbind enable local accounts = Yes
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = No
winbind trusted domains only = No
comment =
path =
username =
invalid users =
valid users =
admin users =
read list =
write list =
printer admin =
force user =
force group =
read only = Yes
create mask = 0744
force create mode = 00
security mask = 0777
force security mode = 00
directory mask = 0755
force directory mode = 00
directory security mask = 0777
force directory security mode = 00
inherit permissions = No
inherit acls = No
guest only = No
guest ok = Yes
only user = No
hosts allow = 192.168.1., 127.0.0.
hosts deny =
nt acl support = Yes
profile acls = No
map acl inherit = No
afs share = No
block size = 1024
max connections = 0
min print space = 0
strict allocate = No
strict sync = No
sync always = No
use sendfile = No
write cache size = 0
max reported print jobs = 0
max print jobs = 1000
printable = No
printing = bsd
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
lppause command =
lpresume command =
queuepause command =
queueresume command =
printer name =
use client driver = No
default devmode = No
default case = lower
case sensitive = No
preserve case = Yes
short preserve case = Yes
mangle case = No
mangling char = ~
hide dot files = Yes
hide special files = No
hide unreadable = No
hide unwriteable files = No
delete veto files = No
veto files =
hide files =
veto oplock files =
map system = No
map hidden = No
map archive = Yes
mangled names = Yes
mangled map =
browseable = Yes
blocking locks = Yes
csc policy = manual
fake oplocks = No
locking = Yes
oplocks = Yes
level2 oplocks = Yes
oplock contention limit = 2
posix locking = Yes
strict locking = Yes
share modes = Yes
copy =
include =
exec =
preexec close = No
postexec =
root preexec =
root preexec close = No
root postexec =
available = Yes
volume =
fstype = NTFS
set directory = No
wide links = Yes
follow symlinks = Yes
dont descend =
magic script =
magic output =
delete readonly = No
dos filemode = No
dos filetimes = No
dos filetime resolution = No
fake directory create times = No
vfs objects =
msdfs root = No
msdfs proxy =

[homes]
comment = Home Directories
read only = No

[jeff]
comment = jeff
path = /home/jeff
valid users = KeyCat
read only = No
create mask = 0765

[root directory]
comment = root
path = /
valid users = pcguest

[tmp]
path = /tmp
valid users = pcguest
read only = No

[lp0]
comment = printer
path = /dev/lp0
read only = No
hosts allow = 192.168.1., 127.0.0., 192.168.1.100
printable = Yes

---------------------------------------------------------------------------------------------------

Another note, winbindd is not running, and clicking the button in SWAT to start it doesn't work.

Again, sorry to get so long here. Any more suggestions?
 
Old 04-10-2004, 03:21 PM   #7
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Original Poster
Rep: Reputation: 30
^bump^
 
Old 04-11-2004, 10:33 AM   #8
NarutoKun
Member
 
Registered: Jan 2004
Location: Puchong, Selangor, Malaysia
Posts: 38

Rep: Reputation: 15
You need the 2 demon shown in SWAT to be started then it'll work.
Try 2 check why the winbindd is not starting. Check the log files.... etc.

If still having trouble and need my help, mail me kelvinlai at veryfast.biz
 
Old 04-11-2004, 11:48 AM   #9
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
I will give you a bit of advice... for a newbie.. I suggest you install webmin http://www.webmin.com/ You can have printers shared through samba very easily....

If you decide to install webmin.. i would also suggest you delete all lines out of your smb.conf file. Then use webmin, after you configure your printer add this under your global config....

use client driver = yes
 
Old 04-12-2004, 11:23 AM   #10
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Original Poster
Rep: Reputation: 30
Still no luck. I took the advice and installed webmin, and configured everything to the best of my ability. I still cannot connect from windows.

I noticed, however, that if I disable my firewall (on the linux box) I get much faster responses when trying to connect from windows, and I get prompted for a username and password when trying to "map network drive" but it does not accept ANY username/pass combination I try.

Is there something worng with how I am going about this FROM THE WINDOWS side? I am trying the following:

1) map netowrk drive - then I enter \\192.168.1.101\tmp and hit finish. After a moment it prompts for username and pass, which it rejects.

2) add network place - enter the same \\192.168.1.101\tmp and hit next. It says it cannot find the location. Then I hit browse instead, and expand the "entire network" , then I expand the "Workgroup", then I try to expand the "linux_box" and it does not expand.

3) add printer - I choose network printer, or printer connected to another computer and hit next, then type \\192.168.1.101\ and let it search for a minute. It then shows linux_box in the tree, but clicking it does not show a printer. So, I enter \\192.168.1.101\lp0 and \\192.168.1.101\dev\lp0, neither of which work.

Am I doing something fundamentally worng here? Are there any specific ports I need to open in my iptables for samba to work? Here is my iptables file:

------------------------------------------------------------------------------------------------
# Firewall configuration written by redhat-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
COMMIT
-----------------------------------------------------------------------------------------------

I added the lines for ports 137-139 myself, in an effort to try to get samba working. Can anybody confirm that they are set up properly to actually open these ports?

I'm at my wits end here. I am really starting to think this is more windows related than anything. What logs would be helpful to monitor with the tail command while doing all this? I was tailing the nmbd.log, and here's what is was saying:

------------------------------------------------------------------------------------------------
[2004/04/12 10:15:09, 1] nmbd/nmbd_incomingrequests.crocess_node_status_request(326)
process_node_status_request: status request for name WORKGROUP<1b> from IP 192.168.1.101 on subnet UNICAST_SUBNET - name not found.
[2004/04/12 10:15:14, 1] nmbd/nmbd_incomingrequests.crocess_node_status_request(326)
process_node_status_request: status request for name WORKGROUP<1b> from IP 192.168.1.101 on subnet UNICAST_SUBNET - name not found.
[2004/04/12 10:15:19, 0] nmbd/nmbd_browsesync.c:domain_master_node_status_fail(247)
domain_master_node_status_fail:
Doing a node status request to the domain master browser
for workgroup WORKGROUP at IP 192.168.1.101 failed.
Cannot sync browser lists.
-----------------------------------------------------------------------------------------------

Anybody see anything there that makes sense to you?

PLEASE HELP!!!!!!

Let me konw what other info will get this resolved. Shall I repost my smb.conf, after all the changes that have been made? Shall I post the shorter version of it, from the file itself, or the really long version put out my SWAT?
 
Old 04-12-2004, 05:51 PM   #11
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Original Poster
Rep: Reputation: 30
[2004/04/12 16:40:33, 1] nmbd/nmbd_incomingrequests.crocess_node_status_request(326)
process_node_status_request: status request for name WORKGROUP<1b> from IP 192.168.1.101 on subnet UNICAST_SUBNET - name not found.
[2004/04/12 16:40:38, 0] nmbd/nmbd_browsesync.c:domain_master_node_status_fail(247)
domain_master_node_status_fail:
Doing a node status request to the domain master browser
for workgroup WORKGROUP at IP 192.168.1.101 failed.
Cannot sync browser lists.


Okay, the above lines from nmbd.log occured WHILE the windows box was trying to access the linux box. In windows, I opened an explorer window (not I.E.) and into the address bar typed file://192.168.1.101/tmp (I have the tmp directory set up for sharing [as can be seen in the LONG smb.conf above] and the permissions on it set to 775).

While it searches, that's what I get. This does not happen if I just type \\192.168.1.101\tmp into the address bar.

Here is the short version of the present smb.conf. PLEASE somebody help me get through this!

------------------------------------------------------------------------------------------------------------
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2004/04/12 15:40:48

# Global parameters
[global]
netbios name = LINUX_BOX
server string = samba_server
password server = None
root directory = /home/jeff
guest account = jeff
username map = /etc/samba/smbusers
log file = /var/log/samba/%m.log
max log size = 50
smb ports = 445 139 138 137
name resolve order = lmhosts host wins bcast
server signing = auto
os level = 255
wins proxy = Yes
wins support = Yes
ldap ssl = no
socket address =
idmap uid = 10000-20000
idmap gid = 10000-20000
template primary group = jeff
template shell = /bin/bash
winbind use default domain = Yes
valid users = jeff
admin users = jeff
guest ok = Yes
hosts allow = 192.168.1., 127.0.0.
dos filemode = Yes
dos filetimes = Yes
dos filetime resolution = Yes

[homes]
comment = Home Directories
path = /home
username = jeff
admin users = root
read only = No

[jeff]
comment = jeff
path = /home/jeff
username = jeff
admin users = root, jeff
read only = No
create mask = 0765

[root]
comment = root
path = /
valid users = nobody

[tmp]
path = /tmp
valid users = nobody
read list = jeff
write list = jeff
read only = No

[printers]
comment = All Printers
path = /var/spool/samba
printer admin = root
printable = Yes
use client driver = Yes
browseable = No
----------------------------------------------------------------------------------------------------------------------

Sorry to get so long AGAIN...I'm desperate!
 
Old 04-12-2004, 06:55 PM   #12
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
here is my global section... I honestly think you have too much under global for just sharing a couple directories and a printer.... here is my config file.. note this is to share home directories only...

Code:
[global]
interfaces = 192.168.1.2/255.255.255.0
security = user
encrypt passwords = yes
workgroup = linux
server string = Samba Server
netbios name = debian
os level = 90

[homes]
browsable = no
writeable = yes
its a fairly simple config file... (im not currently sharing printers though... but your printer config looks good. I would suggest trying my global config on your setup. I also like webmin for ease of adding samba users.
 
Old 04-13-2004, 07:55 AM   #13
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Original Poster
Rep: Reputation: 30
Ah ha! it seems as though this was a firewall issue. I disabled my linux firewall, and can connect FROM windows to the shared directories. I can also install the printer on the windows box, but have yet to be able to get anything to print. It finds it, installs drivers for it (Epson Stylus color 760), but when trying to print nothing happens.

Point is, I at least got this far, so thank you everybody! I'm going to start a new thread relating to the firewall, because I currently have it disabled and that can't be good!

Thanks!
 
  


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
Linux clients sharing a common printer connected to a windows box comox Linux - Networking 1 10-24-2005 07:50 PM
Sharing Network Printer with Fedora Linux Client. bobby_juji10 Linux - Networking 1 09-21-2005 09:02 AM
[Redhat] Sharing a Printer to Windows Box Bi0haZarD Linux - Networking 1 01-13-2005 02:14 PM
Linux box sharing hp6122 printer to windows ciberrust Linux - Hardware 0 11-22-2004 04:55 PM
how to get primary logon network, Access control,File sharing & printer sharing info dileepkk Linux - Networking 2 07-06-2004 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:21 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