aspose file tools*
The moose likes Linux / UNIX and the fly likes How to connect to samba server from window xp ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "How to connect to samba server from window xp ?" Watch "How to connect to samba server from window xp ?" New topic
Author

How to connect to samba server from window xp ?

Jack Lau
Ranch Hand

Joined: Aug 30, 2002
Posts: 166
Hello all,

I have setup a samba server in redhat 9.0 and it is working properly when I use smbclient to access the share folder in window xp from linux. However, I cannot map a network drive in window xp to samba server. Can anyone tell me how to solve it ? (I can sure that the ip I use in network drive points to samba server machine)

Thanks,
Jack
Andrew Eccleston
Ranch Hand

Joined: Jul 07, 2004
Posts: 140
Hi Jack,

First, are you sure that the samba processes are running? If not, try a "ps -ef" command and look for the "nmbd" and "smbd" processes. I do belive, though I can't remember for certain, that you can use smbclient even if the "nmbd" and "smbd" server processes are not running. Second, do you have any shares created in your "smb.conf" file. These will need to be created before you can connect from your xp machine. As part of creating the share, you will need to set up any users/permissions if your shares are not going to be open to all users. The samba documentation should get you going with that. If not, feel free to ask for help.

If it is possible, posting the contents your "smb.conf" file may speed along the help process.

Hope this helps.

andrew


The statement below is true.<br />-------------------------------<br />The statement above is false.
Jack Lau
Ranch Hand

Joined: Aug 30, 2002
Posts: 166
I use the command "ps -ef | grep mb | grep -v grep", it will shows smbd -D and nmbd -D.

My smb.conf is listed below:


Also I use the command "netstat -ano | grep 13" it shows that
tcp 0.0.0.0:139 LISTEN off
udp my linux ip:137 off
udp 0.0.0.0:137 off

Anything wrong, please feel free to comment!

Thanks in advance!
Jack
Kay Liew
Ranch Hand

Joined: Dec 26, 2003
Posts: 112
Your smb.conf file looks fine to me.

I have this section uncommented.

encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

Also, you might want to find out if you need to do the following. But please do "man smbpasswd" before go on. Not sure if you need that or you have done that.

smbpasswd -a root or smbpasswd -a The_User_You've_Granted_Access

-a This option specifies that the username following should be
added to the local smbpasswd file, with the new password typed.
This option is ignored if the username specified already exists
in the smbpasswd file and it is treated like a regular change
password command. Note that the user to be added must already
exist in the system password file (usually /etc/passwd) else the
request to add the user will fail.

Couple other tests/diagnostics you can do. You might already know them, but ...

testparm

or "Net view" on windows OS
or smbclient -L YOURSERVERNAME on the unix OS

Above all else, try to type in the ip on your Windows Explorer, if you can access the Linux with the designated user/pass and not able to see folders then the rest should be targetted on the last sharing section of the smb.conf file.

Good luck and have fun.

k


Unity can only be manifested by the Binary. Unity itself and the idea of Unity are already two.
Jack Lau
Ranch Hand

Joined: Aug 30, 2002
Posts: 166
I try it, but it still does not work.
Someone tell me it is a firewall problem.
Does anyone know how to configure the firewall in order to allow accessing from window to linux ?

Thanks in advance!
Jack
Kay Liew
Ranch Hand

Joined: Dec 26, 2003
Posts: 112
Jack,

Sorry can't help on Linux firewall. Not familliar with that. It shouldn't be installed by default unless you have chosen and setup that up before.

k
Andrew Eccleston
Ranch Hand

Joined: Jul 07, 2004
Posts: 140
First, my experience with RedHat 9 is that it does install the firewall by default, and also configures it for 'high' security. This, of course, blocks the samba ports. My suggestion is to deal with one thing at a time: disable the firewall for now, and get samba to work the way you want. Then, when samba is all set, enable the firewall (if you need/want it) and configure from there.


Originally posted by Jack Lau:


# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = server

# Use password server option only with security = server
password server = jklinux




Judging from these lines, you have told samba that you want to have a different machine do the authenication. However, I'm getting the impression that this is not what you intended. If you change the securiy setting from 'server' to 'share', and comment out the pasword server line, I think you will start to get closer. Then, make sure that there is a system account for the each user that you want to access the samba share. Once, this is all set, you can follow Kay's directions to add users to samba. One note on this: I usually find that it is easiest to make the samba user name match the profile name of the Windows XP user. If the XP user account name contains spaces, this can be a problem on the linux/samba side. (The good news is that there's a way around that, but let's not worry about it yet if we don't need to!)

BTW, since you have the 'domain master' line commented out, you can also comment out the [netlogon] share, as this should only be used when the samba server is acting as a domain controller.

Hope I'm not confusing things further!

andrew
[ September 21, 2004: Message edited by: Andrew Eccleston ]
Kay Liew
Ranch Hand

Joined: Dec 26, 2003
Posts: 112
Agreed with Andrew.

Recently setup another new machine with Samba. Couldn't get it start. Reason? Linux firewall was set too high when i initially setup the box. So try lower the firewall settings. Same thing could happen on your XP firewall. For example, i have assigned specific IP can access to XP box and if the IP you have in Linux not matching up the IP in XP you probably would able to access as well.

Make sure the setting is the similar between the 2 files.
/etc/hosts
/etc/samba/lmhosts

Make sure you samba user also exist in XP or vice versa. Well, you get the idea.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to connect to samba server from window xp ?
 
Similar Threads
String sourceDirectory="some samba drive"
Eclipse lomboz deployment to Linux via samba
need help sharing a file in redhat linux
How to access Map Network Path from Websphere Application
Unable to launch Tomcat from eclipse.