Need help setting up samba between Linux and Windows X P
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Need help setting up samba between Linux and Windows X P
Hi all,
I have to machines that i would like to be able to access from one to the other. I would like to be able to access shares on the Linux (Fedora 8) machine from my Windows XP machine.
The IP addresses are configured as below
Code:
XP - 192.168.0.2
Linux - 192.168.0.3
Both XP and linux machines have the following configuration
Subnet mask - 255.255.255.0
Gateway(Router address) - 192.168.0.1
I have installed Samba and it is running. The problem i have is that when i try to map to the linux share on my XP machine the username and password are never accepted.
The username i am logged on as on the XP box is the same username and password that is configured on Samba. I try to access it using the "Map to Network Drive" option on explorer. I then type the share path as
Code:
\\192.168.0.3\music
I get a login prompt but when i enter the login details they get rejected. Here is the samba configuration file.
Code:
# Global Parameters
workgroup = WORKGROUP
netbios name = samba
; encrypt passwords = yes
[homes]
read only = no
browseable = no
[music]
path = /tmp
; browseable = yes
write list = ziggy, root
writeable = yes
guest ok = yes
[everyone]
path = /data/everyone
read only = no
; browseable = yes
[apps]
path = /data/apps
; browseable = yes
valid users = @admins, ziggy, root
write list = @admin, ziggy, root
At the moment i am just testing the connection so im using the [music] share which is just pointing to the /tmp directory.
One other thing that i found interesting is that i can ping the linux box from the XP box but not the other way round.
One other interesting thing is that when i click on
Start > My Computer > My Network Places > View Workgroup computers on the XP machine i see an icon called "samba 3.0.30.fc8(Samba)". Wheni click on it i get the following error.
Code:
\\samba is not accessible. You might not have permision to use this network resource.
Im not sure why its refered to as \\samba.
Can anyone please offer some help as to what i am doing wrong.
One other thing that i found interesting is that i can ping the linux box from the XP box but not the other way round.
You need IP connectivity in both directions, first. The rest of the issues can not be sorted until this is fixed.
My guess, you probably have the firewall on XP blocking the reverse ping. Try turning it off, and try the ping again. I have several XP systems, and a vista box all working. You can run the firewall, but have to open the posts for windoze networking for it to work. Since you have a router, they are usually firewalled, so unless you have an internal security concern, you can leave the windbloze firewall off. Your choice, but if it is on, ports have to be open.
In general terms, you do not share anything in the '/' root directory. So the permission issue is probably related to the /tmp ( root ) location. Create a /home/yourusername/music directory, put a mp3 in there and share it. Try again. You will need to add the share to the /etc/samba/smb.conf file.
If the user names are the same on both systems, and the passwords are the same, and you added the users and passwords to samba with 'smbpasswd' command, then the only other thing that may cause problems is the encryption. You have
Quote:
; encrypt passwords = yes
Note, the ';' is commenting out this line. I think encryption = yes is the default, and this is what XP sends, unless you have altered it in the registry. So, remove the ';' character, unless you edited the registry.
I've disabled the XP firewall and can now ping both ways.
I changed the smb.conf file and restarted samba as you suggested but i still cant connect to it. Here is the changed smb.conf file. I changed the [music] share to point to a directory that exists in my home directory.
Code:
# Global Parameters
workgroup = WORKGROUP
netbios name = samba
encrypt passwords = yes
[homes]
read only = no
browseable = no
[music]
path = /home/ziggy/Pictures
browseable = yes
write list = ziggy, root
writeable = yes
guest ok = yes
[everyone]
path = /data/everyone
read only = no
; browseable = yes
[apps]
path = /data/apps
; browseable = yes
valid users = @admins, ziggy, root
write list = @admin, ziggy, root
The Pictures directory has the following permissions set and i am loggin on as the ziggy user.
Your firewall to the outside world should have nothing to do with the problem. For now, leave it alone. You now have IP connectivity.
You do not have much in the Global section, so you are using samba defaults. Not sure what is now causing the problem.
Can you 'see' the shares it you go to Network Neighborhood or what ever they call it this week at M$ ?
I'm going to post my smb.conf, you will see I'm using wins config. If you can not see the shares, then enable Wins in samba, and config it on your winbloze system. That may help, it won't hurt and will improve speed at finding things on the network. Make sure the workgroup name is the same on all machines... also.
Quote:
[global]
workgroup = CLIFFSHOME
server string = Samba Server %v
map to guest = Bad User
guest account = guest
log level = 3
log file = /var/log/samba/%m.log
max log size = 50
printcap cache time = 60
printcap name = cups
os level = 255
preferred master = Yes
dns proxy = No
wins support = Yes
[homes]
comment = Home Directories
read only = No
browseable = No
[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.
use client driver = Yes
browseable = No
[print$]
path = /var/lib/samba/printers
write list = @adm, root
inherit permissions = Yes
guest ok = Yes
Thanks guys for your help i can now see the shares. I changed the file as shown below and it now seems to be working. I dont quite know what change fixed it.
Code:
# Global Parameters
workgroup = WORKGROUP
netbios name = Samba
encrypt passwords = yes
security = share
[homes]
read only = no
browseable = no
[media]
path = /media
browseable = yes
writeable = yes
valid users = ziggy, root
I noticed you have cliff and @cliff in the valid users section. What does it mean when it is prefixed with the @ sign?
Location: Pensacola, Fl. Lived in MD, DC and VA area for years
Distribution: Debian Etch
Posts: 17
Rep:
I am currently working with Samba to set up my multi dimensional Microslop and Linux network and stumbled on a free Samba ebook that addresses alot of issues discussed in your post. The link, if the ebook isn't in your documentation is http://oreilly.com/catalog/9780596002565/. They go into detail with each MS operating system network config for interfacing Samba with the exception of Windows Server 2003 which I also have lashed up to my network. At any rate I thought the documentation resource might be worthwhile as it is well written and seems pretty comprehensive. I am not an expert of course. Good luck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.