Click to See Complete Forum and Search --> : SAMBA ..viewing Linux from XP


bcsmith100
09-16-2002, 04:31 PM
With help from previous posts I now have a network setup of an XP machine, a Windows 98 machine and 2 Linux machines. The first Linux machine is my old Windows machine as is the primary focus of my work. This is running Red Hat 7.3.

The second Linux machines is a Sun-Cobalt Qube 3. It is running a sun modified version of Linux 2.2 (based on Red hat). I got this machine for free (which is a long story). I have just restored the O/S on this and have all of its systems set to the default values.

I can ping all machines by IP address and name (I put the names in the /system..../Host file on windows to get this working... oh well as far as DHCP goes, but hey it works!).

Now for (hopefully) my last problem. On my XP machine when I bring up the browser I of my network places I see the following:

guest-share on Coblat Qube 3 (DHCPPC4)
home on Cobalt Qube 3 (DHCPPC4)
netlogon on Cobalt Qube 3 (DHCPPC4)
profiles on Cobalt Qube 3 (DHCPPC4)
restore on Cobalt Qube 3 (DHCPPC4)
Shareddocs on Office Xp (WinXP)
shareddocs on laptop (Win98)

notice that I don't have any shares into my Linux workstation.
-------------------------------------------------------------------------------

When I try to open any of the directories on the Qube, I get access and everything is working... unfortantely I don't have access to its SMB.conf file to figure out how this was set up...but at least I know that I don't have a major problem in the network
instead the file is with the linux side (which I suspected for a while).

Next I use the "view workgroup computers" and I see:

Office XP (WinXP)
Laptop (Win98)
Cobalt Qube 3 (DHCPPC3)
Linuxstation server (Linuxstation)

Again I can click on the cobalt Qube 3 file and see the directories and files. When I click on Linuxstation server I get
"\\linuxstation is not accessible. You might not have permisions...."

Questions
==========
1) How do I set up folders on the Linux station so that they appear in the Windows browsers? I believe that this will make the directories also appear in the "view workgroup computers" based on what I am seeing for the Qube.

===================================
Here is my SMB.conf file for my Linux workstation:
===================================
[global]
workgroup = Home
netbois name = Linuxstation
server string = Linusstation server
encrypt passwords = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
hosts allow = 192.168.0.
printing = lprng
local master = No
domain master = No

[homes]
read only = No
browseable = Yes

[printers]
path = /var/spool/samba
printable = Yes
browseable = Yes

[shared]
path = /tmp

[windowusers]
path = /windowusers
public = no
writeable = Yes
write list = @windowusers
printable = no


final comments
===========

I have created a group called "windowusers" and I have used smbpasswd -a to create a user account for my window user account.

I can use the command:
smbmount //WinXP/shared /windowusers
this creates allows my Linux worstation to access the windows shared directory.

However, what I am missing is how to define a directory on the Linux workstation so that Windows can see it....I think I am close... does this go under [shared] ??????

Any comments and/or help would be appreciated.

wader
09-16-2002, 06:40 PM
Please let me know when u get this answered.
I have been trying for 4 days with the same problem exactly.
I can manually log into win xp machine but it wont browse.
Xp sees the linux box and wont let me go anywhere and give the same message you already stated.
So if you get help could you please email me here:
wader@telusplanet.net

I would really appreciate that!!

thanx

cowanrl
09-16-2002, 07:16 PM
That acts like a firewall problem on the Red Hat 7.3 machine. If you accept the default firewall during the RH 7.3 install, it will block all Samba traffic(except broadcasts which is why you can see the Samba server but can't access anything).
To stop the firewall, execute these commands on the Linux machine as root:

service ipchains stop
service iptables stop

Then try to access your Samba shares.

If it works, you'll either need to disable the firewall all together or configure it to pass the Samba traffic.

wader
09-16-2002, 07:23 PM
it didnt work for me.
I cut my smb.conf file way down.
Will this work:

[global]
workgroup = games
netbois name = linux box
server string = samba server


[homes]
read only = No
browseable = Yes

cowanrl
09-16-2002, 07:47 PM
Wader:

First, take the space out of your NetBIOS name. It will cause you nothing but problems, whether it's legal or not.

Since you don't specify a "security = " setting in your smb.conf file, it defaults to security = user. With this you need to be sure you have 2 user accounts created on your linux machine that match the user account you log in to your XP machine with. Lets say you use the username of wader to log in to XP with.

The first user account is the Linux user account. You create it with the adduser command. As root, enter these commands:

adduser wader
passwd wader

Enter a password for the wader account. It does not have to be the same password as you use on your XP machine.

The second account is the Samba user account. As root, enter these command:

smbpasswd -a wader

If it is the first time you've used smbpasswd, it will give you an error message that the database can't be opened. Ignore it.
Enter a password for the Samba wader user. Make it the same as the password for wader on the XP machine.

Now try to access your Samba server. If you can't browse to it right away, try to map a drive letter to \\linuxbox\wader on the XP machine.
You may also want to restart Samba and re-login to the XP machine.

wader
09-16-2002, 08:13 PM
Cowanrl,

thanxfor the prompt reply.
I am also trying for help on another forum and cooming up empty. There I have offered "more info" than here.
So you understand where I am at: 1. Linux=zero knowledge for me.
2.I do not use passwords on the XP machines (3 of them) wife,me, kid :-)

Will that impact anything?
Also I am thinking this whole smb.conf is going nowhere and the issue lies elsewhere.
I can access the XP machine thru Konquerer by manually typing in the address: smb://wader
I see all the shares that way.
I can do that with the other machines as well.
So I have a connection!!?
However when I want to use the browse server option on the Linux box it says lan://localhost not found. SO that makes me think something is amiss other than the smb.conf.

What you think?

I will remove the space but I will wait to see what u say concening no passwords in XP.

Btw I been reading piles and piles of stuff related to this.
Just so ya know.

wader
09-16-2002, 08:26 PM
Cowanrl
OK I edit smb.conf to this:
[global]
workgroup = games
netbios name = linuxbox
server string = samba server
security = share


[homes]
read only = No
browseable = Yes

Now I am able to browse and I get 2 folders neither of which I can get into.
I need a password.
So if I do the smbpasswd thing will that let me in anywhere?
Or do I edit the smb.conf file some more?

Least I'm getting somewhere now!!
lol

wader
09-16-2002, 08:38 PM
BCSMITH100
You have netbios spelled netbois?

Not linux smart so I am asking is that an error?

cowanrl
09-16-2002, 08:44 PM
Another option that I forgot you would need in your smb.conf file the way it stands is encrypt passwords = yes.

But, since you aren't using passwords on your XP machines, security must not be a real issue. Lets keep things simple. Add this line to your smb.conf file:

security = share

That will make all access guest access. It won't require username and passwords from the Windows machines.

When using this type of security, the homes share is inappropriate. It relies on the username you connect with to create the share. Remove the lines for the homes share.
I suggest you just create a public share for you all to access and share files on. Add these lines to your smb.conf file:

[public]
path = /public
writeable = yes
browseable = yes
guest ok = yes


Then enter these commands as root on the Linux machine to create the directory and set the proper permissions:

mkdir /public
chmod 777 /public

Restart Samba and see if you can access the public share from your XP machines.

There is an option for the smb.conf file called null passwords which allows user accounts with no passwords. If you don't like the guest type access, you might try it.

cowanrl
09-16-2002, 08:48 PM
The spelling of netbios would be important. It could cause the NetBIOS name of the Samba server to default to whatever the host name of the Linux server is. If the hostname is localhost, that can keep Windows machines from connecting to it.

wader
09-16-2002, 09:17 PM
Yes we are successfull!!!

A big thank you.
I've been struggling for four or five days now.
Was almost ready to give up.
Your suggestion to do the public folder worked perfectly.

I missed your earlier post due to not refreshing the browser.
So I kinda edited things that u may have missed.


For some strange reason I have 2 instances of samba server now tho only one is accessible. The old one uses the name linux
The One I can access is linuxbox
Likely due to me trying to get things to work.
Rebooting XP didnt help
Any idea where I should be looking to find this other "linux"
My working smb.conf looks like this:
[global]
workgroup = games
netbios name = linuxbox
server string = samba server
security = share

[public]
path = /public
writeable = yes
browseable = yes
guest ok = yes

wader
09-16-2002, 09:23 PM
Never mind about that other linux.
What I was doing was running the service
smnpd! It was that that I was trying to get to work all along!! -> stoopid <-

What does the smnpd do?
I thought it was required?

If I wanted to access all files on the linuxbox, would that be easy to setup? and is it done in the smb.conf file?

Again big thanx!!

cowanrl
09-17-2002, 04:49 AM
Do you mean snmpd? snmp is Simple Network Management Protocol. It's for remotely monitoring and configuring networking equipment. It is not required to use Samba.

Glad you finall got it working.

wader
09-17-2002, 06:27 PM
Thanks for the Explaination Cowanrl.

Any ideas as to why my bootup has slowed way down?
It hangs longer on the eth0 startup and really hangs big time on the "starting sendmail"

Maybe 2 minutes when it was a few seconds before.

Thanx

bcsmith100
09-17-2002, 07:17 PM
Thanks for all the responses.

The mispelling on netbios was in my post only. The file was correct.

As far as the suggestion to stop the IPchains and tables, I had already tried this when I was working to get the name resolution setup. This does work but it is not the only solution. I was able to get the name to resolve by using the host file on windows. This does not have the downside of shutting down the firewall.

I have created a user using SMBPASSWD -a on my linux box... so I think the root cause of the problem is in the smb.conf file.

I am now creating a [shared] entry and putting more options under this to try to get this to show up as a directory in windows.