View Full Version : [ubuntu] Do I need a static IP address to share files with Windows using Samba?
jcd29
August 30th, 2010, 03:18 PM
I seem to remember I could just use DHCP given addresses when sharing from Windows to Windows, and they'd keep sharing even when the IPs changed.
lukeiamyourfather
August 30th, 2010, 03:34 PM
A static IP address is not required to share files with Samba.
jcd29
August 30th, 2010, 09:02 PM
A static IP address is not required to share files with Samba.
Thanks! So if my IP address changed by DHCP I'd still be able to keep sharing with the other computers like how it was with Windows?
lukeiamyourfather
August 30th, 2010, 09:49 PM
Thanks! So if my IP address changed by DHCP I'd still be able to keep sharing with the other computers like how it was with Windows?
Yes, as long as the shares are accessed by hostname and Samba is configured properly on the server.
pricetech
August 30th, 2010, 10:26 PM
If it makes your life easier you can have your router assign the same IP to each computer according to MAC address.
At least with most routers anyway. Look for something like "IP Reservation" or some such wording as that.
In case host name doesn't always work.
jcd29
August 30th, 2010, 10:34 PM
Yes, as long as the shares are accessed by hostname and Samba is configured properly on the server.
All the important things I have to edit are in smb.conf, right?
If it makes your life easier you can have your router assign the same IP to each computer according to MAC address.
At least with most routers anyway. Look for something like "IP Reservation" or some such wording as that.
In case host name doesn't always work.
I was trying to keep the addresses dynamic for now, but yeah I could do that.
Oh another thing: should I install CIFS or smbfs? Or just samba?
Iowan
August 30th, 2010, 10:56 PM
Oh another thing: should I install CIFS or smbfs? Or just samba? I've never installed smbfs, but have seen threads that recommend it. In reality, smbfs will install CIFS for you (or so I've read...)
jcd29
August 30th, 2010, 11:08 PM
I've never installed smbfs, but have seen threads that recommend it. In reality, smbfs will install CIFS for you (or so I've read...)
What would I need it for, though?
redmk2
August 30th, 2010, 11:16 PM
What would I need it for, though?
The package smbfs it is the client side of Samba. Samba (smbd and nmbd) is the server side.
pricetech
August 30th, 2010, 11:40 PM
Using Synaptic, install system-config-samba which will not only install Samba, but will give you a GUI to configure it with.
That's all you need.
pricetech
August 30th, 2010, 11:44 PM
I was trying to keep the addresses dynamic for now, but yeah I could do that.
They'll still be dynamic. It's just that your router will always assign the "reserved" IP to the MAC of the computer it's reserved for.
If for example you have a laptop, which needs DHCP for you local hotspot, it will still work just like it always did because you're not assigning an IP to the laptop.
However, when you connect back to you home network, your laptop asks for an IP from your router and your router finds the MAC in its list and assigns the same IP again to the laptop.
Hence your laptop has the advantages of a fixed IP when your home, and a dynamic IP when you're elsewhere.
Make sense ??
jcd29
August 30th, 2010, 11:59 PM
After doing this it should appear under "network places" in my Windows computer right away, correct? (Where do I set the hostname so it doesn't have to be accessed by IP?)
They'll still be dynamic. It's just that your router will always assign the "reserved" IP to the MAC of the computer it's reserved for.
If for example you have a laptop, which needs DHCP for you local hotspot, it will still work just like it always did because you're not assigning an IP to the laptop.
However, when you connect back to you home network, your laptop asks for an IP from your router and your router finds the MAC in its list and assigns the same IP again to the laptop.
Hence your laptop has the advantages of a fixed IP when your home, and a dynamic IP when you're elsewhere.
Make sense ??
Ah, of course. My head's being thick today :lol:
I'll check that in my router, thanks.
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.