Jump to content

Samba + Win XP


MrWhisp
 Share

Recommended Posts

Hi,

 

I have some trouble connecting to my Samba server from a Win XP workstation in the same LAN.

When I test my Samba configuration from Linux with smbclient everything works just fine, but when I try the same from Win XP I get "The network location cannot be reached". I have Shorewall set to accept all tcp/upd/icmp packets from the local LAN. It is possible to PING the linux station from Win XP, so Shorewall shouldn't be the problem. I can't get it to work even when Shorewall is stopped...

 

Anyone experienced in this problem?

 

/MrWhisp

Link to comment
Share on other sites

did you make sure you have the samba server setup and configured?

 

as SoulSe mentioned, post your samba.conf

 

Also, check in Mandrake Control Center -> System -> Services and make sure smb/samba is running.

Link to comment
Share on other sites

Samba is running, and I can connect to my user from the Linux station with

smbclient //localhost/jha

 

If I check the NetBios status from Win XP with

nbtstat -a [iP to Linux station]

I see that Samba is running.

 

When I try to connect or view NetBios services using

net use \\[iP]\[My user]

or

net view \\[iP]

I get "Host not reachable"

 

Here is my smb.conf file:

# Global parameters
[global]
log file = /var/log/samba/log.%m
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
map to guest = Bad User
encrypt passwords = yes
printer admin = @adm
dns proxy = No
server string = Samba Server %v
printing = cups
default = homes
workgroup = LocalLAN
os level = 20
printcap name = cups
valid users = jha
max log size = 50

[homes]
guest ok = No
read only = No
browseable = Yes

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.
browseable = No

[print$]
path = /var/lib/samba/printers
write list = @adm, root
inherit permissions = Yes
guest ok = Yes

[pdf-generator]
comment = PDF Generator (only valid users)
path = /var/tmp
printable = Yes
print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &

Link to comment
Share on other sites

hmm...

 

ok, one of two things to try first:

 

Try enabling guest access (change it from no to yes in your smb.conf) and then restart the server.

 

-or-

 

Create a user on your Linux box with the same name as the user on your XP box.

Link to comment
Share on other sites

Guest nunyas

Hi all,

I'm experiencing the exact same problem as MrWhipser. My network consists of 5 WinXP machines and a single Mandrake Linux 10 Official release machine. The linux box has smbd and nmbd running and I can see the Linux box in my "Network Neighborhood". However, when ever i attempt to access the server via smb I always get the message "server is not accessible." I've tried changing the "interface" parameter and changing the "hosts allow" to various settings including the default settings but I always end up with the same error message.

 

This is my samba config

 

[global]
       workgroup = ME
       server string = Nunyas Samba Server
       interfaces = eth1
       map to guest = Bad User
       guest account = ftp
       username map = /etc/samba/smbusers
       log file = /var/log/samba/log.%m
       max log size = 50
       socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
       os level = 99
       preferred master = Yes
       domain master = Yes
       dns proxy = No
       ldap ssl = no

[homes]
       comment = Home Directories
       read only = No
       browseable = No

[public]
       comment = Public Stuff
       path = /home/public
       read only = No
       guest ok = Yes

[tmp]
       path = /tmp
       read only = No

Link to comment
Share on other sites

The only way I have ever had any luck setting up SAMBA was with webmin.

 

Install webmin:

 

#urpmi webmin

 

Start it up:

 

#/etc/init.d/webmin start

 

Open your browser to

 

https://localhost:10000

 

sometimes its

 

http://localhost:10000

 

Depending if you have encription activated.

 

Navigate to the Sever tab and then select Windows SAMBA Share Manager. There is even a button at the bottom to restart SAMBA. Try that.

Link to comment
Share on other sites

Guest nunyas

Fixed my problems with Samba.... I used this thread:

 

Shorewall Settings and Samba

 

I also changed my smb.conf file to the following and now it's working flawlessly:

 

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2004/05/16 21:58:36

# Global parameters
[global]
       workgroup = ME
       server string = Nunyas Samba Server
       map to guest = Bad User
       guest account = ftp
       username map = /etc/samba/smbusers
       log file = /var/log/samba/log.%m
       max log size = 50
       socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
       os level = 99
       preferred master = yes
       domain master = Yes
       dns proxy = No
       ldap ssl = no

[homes]
       comment = Home Directories
       read only = No
       browseable = No

[public]
       comment = Public Stuff
       path = /home/public
       read only = No
       guest ok = Yes

 

The interesting thing is that I had "configured" Shorewall to allow smb (samba) connections using the GUI config tools and the config that it gave me didn't work. So, I manually adjusted the Shorewall config files to match what was listed in the thread that I linked to above.

 

The OTHER thing that I changed in my system config was my NIC assignments... I changed the LAN to eth0 and the ADSL connection to eth1 (via modules.conf). And made the corresponding changes in the Shorewall config files.

 

Thanks for the help ... :)

Link to comment
Share on other sites

  • 1 month later...
Guest ndumi

I had a similar problem. In my case it appeared to be a case of incorrect entries in the smbpasswd file. I used Webmin to export Linux users and passwords to the smbpasswd file, however, Webmin did not do that correctly.

 

Solution:

 

In Webmin choose the option to edit samba users. Select each user name and choose the option to create new password and type the user's normal Unix/Linux password. Repeat for all users -> save changes and restart your samba server.

 

In my case this worked and I think any other way of copying Linux/Unix users to Samba user should work - do not trust Webmin for that though. (If you vi /etc/samba/smbpasswd you may notice that the passwords in the file do not look right! - I am no expert on this by the way.)

Edited by ndumi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...