Click to See Complete Forum and Search --> : Is Samba What I Need??


paulb
10-12-2001, 11:52 AM
First of all, is there a Samba server for windows? Im sure there is, so where do I get it?

Next, is Samba what I need? I want to share a Windows computers Printer/Inernet/Files with a linux computer, without paying extra internet costs.

solo
10-12-2001, 12:10 PM
As far as I know; Samba is a Linux program that lets you share files, and printers with Windows. I'm not sure if it supports internet sharing, or not... You may have to use Apache for that, or setup a gateway with ipmasq.

Dagda
10-12-2001, 12:41 PM
It does not share Internet access. What box is connected to the Internet your win or Linux?

AdaHacker
10-12-2001, 12:56 PM
I've been looking in to SAMBA, so I want to get in on this too.

Does anyone know exactly how the file sharing works? As I understand it, you can map part of you Linux filesystem to a drive on the windows box, but does it go the other way? Can you mount part of the Windows filesystem on the Linux box? And am I correct in thinking you can share a printer regardless of which box it's hooked to?


paulb:
As Dagda said, you don't use SAMBA for internet sharing. There are commercial products that allow it on a Windows box, but if you hook the Linux box up to the internet connection, you can achieve a very nice little network with a combination of DHCP and ipchains/iptables. There's a home-networking mini-HOWTO which I found to be very helpful. It's tailored to Redhat, but most of it can be adapted to other distributions (may require a little knowledge or research).

paulb
10-12-2001, 08:12 PM
Originally posted by Dagda:
<STRONG>It does not share Internet access. What box is connected to the Internet your win or Linux?</STRONG>

Thats the problem. Its my windows box.

Molecule Man
10-12-2001, 08:36 PM
Internet Sharing from Win to Linux (http://www.linuxnewbie.org/nhf/intel/network/analogx_winproxy.html)

When you do file sharing in windows in a peer-to-peer network, that is SMB, the same protocol that Samba is built on.

paulb
10-12-2001, 08:58 PM
Did samba develop that? Thanks for the link.

paulb
10-12-2001, 09:01 PM
Thanks for the link, but I've been there a while ago.. It scared me when it said that my IP might charge me more, though.

What kind of card do I need...

I forget what else I was gonna say.

Evil Jeff
10-12-2001, 09:47 PM
Ok, here is the basic low down on samba. Windows uses a protocol called smb (sometimes called cifs) for network file sharing on a windows network. The wonderful linux developers who make our lives easier created samba, a program that allows you, from the command line, to share files and view shares on a windows network, using windows' file sharing protocol.

It's fairly easy to configure if you have used linux for a while, and you can also configure it through a web-based app that comes with it called SWAT (samba web administration something) or linuxconf (comes with most rpm based distros).

If you want something like the network neighborhood and you already have samba installed, you should look into LinNeighborhood (check google for the homepage).

Browsing network shares with samba is very similar to mounting and browsing cdroms or floppy drives in linux. You would use a command like this:

smbmount //computername/sharename /path/to/local/directory/ -o username=useridwithaccess

It would then prompt you for a password to give you access to the share. If the share is on a win98 machine, you might not need the -o or username= parts.

Good luck.

paulb
10-12-2001, 09:53 PM
ok, thanks.

paulb
10-13-2001, 07:15 AM
This stuff is really confussing. Does windows have SMB built into it?

bdg1983
10-13-2001, 07:39 AM
Yes it does.

The Samba NHF and/or the documentation at www.samba.org (http://www.samba.org) will tell you how to configure both Linux and Windows.

Actually the Samba package installs most of the documentation to your hd. Mines in /usr/share/doc/packages though some distros use /usr/doc. There's lots there in text and html format. Probably all that you will need.

Always check the documentation installed on your hd first. You'll be surprised how much there is.

DMR
10-13-2001, 07:40 AM
--deleted.

Beaten to the punch by the Lawn Gnome, damn!
;)

BTW- 'morning Mike.

[ 13 October 2001: Message edited by: DMR ]

paulb
10-13-2001, 07:48 AM
Originally posted by DMR:
<STRONG>--deleted.

Beaten to the punch by the Lawn Gnome, damn!
;)
[ 13 October 2001: Message edited by: DMR ]</STRONG>

Huh???

bdg1983
10-13-2001, 08:14 AM
Morning David.

Your slowing down though getting home at 2 a.m. could have something to do with it.

I don't see a member named Lawn Gnome in this thread. Your not talking about me? :)

ryan00002
10-13-2001, 08:46 AM
hi i just wanted to point out that hte oreily book "using samba" is available for free on their website in eiher html or pdf format. i believe this is from 99, so its not the curretn revision. but any o'reilly book should be helpful.

Ludootje
10-13-2001, 11:36 AM
Originally posted by paulb:
<STRONG>Thats the problem. Its my windows box.</STRONG>

possibly the explanation is already in this topic, but I ain't going to read it all..

You need a network card and internet sharing, SMB isn't the solution - if you can't let it work, make your linux the server and use LAN

Ludo

paulb
10-13-2001, 02:41 PM
Could I make a program to access the inernet on my windows computer and then sent the website/file to my linux computer with a network card?

I have some experience programming on Linux, and enough on windows, all I need is some way to send the information across a network card or some other wire.

bdg1983
10-13-2001, 03:41 PM
Win98 SE, ME, W2K and XP all have some form of Internet Connection Sharing. It's just a matter of using 2 nics in Windows setting up ICS and one nic in Linux.

paulb
10-14-2001, 03:26 PM
Originally posted by Logon Name Gone:
<STRONG>It's just a matter of using 2 nics in Windows setting up ICS and one nic in Linux.</STRONG>

Ok..... How do I do that (!?!)

bdg1983
10-14-2001, 04:23 PM
Not really sure how it is done in W2K since I've never used ICS/routing in W2K myself.

Have a look in the Networking properties as it should be there.

Microsoft's support/documentation website should have procedures on how to set it up. Just do a search at their knowledgebase.

bdg1983
10-14-2001, 04:32 PM
From Microsoft...


Internet connection sharing

With the Internet connection sharing feature of Network and Dial-up Connections, you can use Windows*2000 to connect your home network or small office network to the Internet. For example, you might have a home network that connects to the Internet by using a dial-up connection. By enabling Internet connection sharing on the computer that uses the dial-up connection, you are providing network address translation, addressing, and name resolution services for all computers on your home network. For information about enabling Internet connection sharing, see To enable Internet connection sharing on a network connection

After Internet connection sharing is enabled, and users verify their networking and Internet options, home network or small office network users can use applications such as Internet Explorer and Outlook Express as if they were already connected to the Internet Service Provider (ISP). The Internet connection sharing computer then dials the ISP and creates the connection so that the user can reach the specified Web address or resource. To use the Internet connection sharing feature, users on your home office or small office network must configure TCP/IP on their local area connection to obtain an IP address automatically. For more information, see To configure TCP/IP settings Also, home office or small office network users must configure Internet options for Internet connection sharing. For more information, see To configure Internet options for Internet connection sharing

The Internet connection sharing feature is intended for use in a small office or home office where network configuration and the Internet connection are managed by the computer running Windows*2000 where the shared connection resides. It is assumed that on its network, this computer is the only Internet connection, the only gateway to the Internet, and that it sets up all internal network addresses.

You might need to configure applications and services on the Internet connection sharing computer to work properly across the Internet. For example, if users on your home network want to play the Diablo game with other users on the Internet, you must configure the Diablo application on the connection where Internet connection sharing is enabled. Conversely, services that you provide must be configured so that Internet users can access them. For example, if you are hosting a Web server on your home network and want Internet users to be able to connect to it, you must configure the Web server service on the Internet connection sharing computer. For more information, see To configure Internet connection sharing for applications and services

For information about the protocols, services, interfaces, and routes that are configured by enabling Internet connection sharing, see Internet connection sharing settings

*Important

To configure Internet connection sharing, you must be a member of the Administrators group.
You should not use this feature in an existing network with other Windows*2000 Server domain controllers, DNS addresses. If you are running Windows*2000 Server, and one or more of these components exist, you must use network address translation to achieve the same result. For more information, see Deploying network address translation
A computer with Internet connection sharing needs two connections. One connection, typically a LAN adapter, connects to the computers on the home network. The other connection connects the home network to the Internet. You need to ensure that Internet connection sharing is enabled on the connection that connects your home network to the Internet. By doing this, the home network connection appropriately allocates TCP/IP addresses to its own users, the shared connection can connect your home network to the Internet, and users outside your home network are not at risk of receiving inappropriate addresses from your home network. By enabling Internet connection sharing on a connection, the Internet connection sharing computer becomes a Dynamic Host Configuration Protocol (DHCP) allocator for the home network. DHCP distributes TCP/IP addresses to users as they start up. If Internet connection sharing is enabled on the wrong network adapter, users outside your home network might be granted TCP/IP addresses by the home network DHCP allocator, causing problems on their own networks.
When you enable Internet connection sharing, the adapter connected to the home or small office network is given a new static IP address configuration. Consequently, TCP/IP connections established between any small office or home office computer and the Internet connection sharing computer at the time of enabling Internet connection sharing are lost and need to be reestablished.

*Note

You cannot modify the default configuration of Internet connection sharing. This includes items such as disabling the DHCP allocator or modifying the range of private IP addresses that are distributed, disabling the DNS proxy, configuring a range of public IP addresses, or configuring inbound mappings. If you want to modify any of these items, you must use network address translation.
If your home office users need to access a corporate network that is connected to the Internet by a tunnel server from an Internet connection sharing network, they need to create a virtual private network (VPN) connection to tunnel from the computer on the Internet connection sharing network to the corporate tunnel server on the Internet. The VPN connection is authenticated and secure and creating the tunneled connection allocates proper IP addresses, DNS server addresses, and WINS server addresses for the corporate network. For more information about creating a virtual private network (VPN) connection, see To make a virtual private network (VPN) connection

Joeri Sebrechts
10-14-2001, 04:50 PM
Originally posted by paulb:
<STRONG>First of all, is there a Samba server for windows? Im sure there is, so where do I get it?

Next, is Samba what I need? I want to share a Windows computers Printer/Inernet/Files with a linux computer, without paying extra internet costs.</STRONG>

You need to understand an important point regarding samba. Samba _serves_ file shares or printers. In other words, you use it when you want your windows boxes to use drive space or printers attached to your linux box.

Now, when you go the other way, you use a special filesystem, smbfs, to mount windows shares in your network just like you would mount any other filesystem. You can actually type a mount command and give it smbfs in a -t option, and that will work, if your kernel supports smbfs. For this you DO need smbmount, which is separate from samba (and most likely not even developed by the same people).

MarkLeong
10-14-2001, 11:31 PM
Just want to share my experience about a little network which I put up.

The network consists of Win98 m/cs and one Linux box (will be 2 soon). One of the Win98 m/c is used as a gateway to the Internet (dial up). What I did was to enable Internet Connection Sharing for the gateway m/c.

The for other m/cs on the network, set the gateway to point to the gateway m/c. DNS is pointing to my ISP DNS servers. For the browsers, I set the proxy server to my ISP's proxy server.

Samba is used to share and view files on the Linux box. The Linux box can access files on the Win98 m/cs using smbclient after performing a smbmount.

Everything seems to be working fine so far.

By the way, if you have Win95 and Win98 m/cs on the network, samba might have a problem. Look at the password encryption issue for samba.

Hope this posting is useful.

paulb
10-15-2001, 02:58 PM
Wow, lots of people are posting on this board. Thanks to all of you.

When I look at the networking properties and click add|service, it lists:
File and Print sharing for Microsoft Networks
" " " " " Netware Networks
Service for netware directory service.


Which one do I use for Samba, or do I need somthing first?

Also, can I set the permissions of a script to execute (on my win box) so that the remote computer recives the output of a script?

rikky
10-15-2001, 03:19 PM
here's an nice article which I found useful for implementing samba and configuring it: http://www.zdnetindia.com/techzone/linuxcentre/stories/24073.html
hope you find it useful.
All the best!
Rikky

paulb
10-15-2001, 04:37 PM
Say I had the card, this is what I would do(?):

In Control Panel|Network|Add click Microsoft Network

Set up Samba on my Linux box

Then is there a folder for my shares or what??

Thanx you guys your really helpful. Slowly I am getting this.

paulb
10-15-2001, 08:35 PM
Can I make it so that a program is excecuted as a CGI script would be and the client gets the CGI output?

MarkLeong
10-15-2001, 08:51 PM
Don't take this the wrong way but maybe you could pick up a book from the library and follow the instructions on how to set up the network.

Try a book titled "RedHat Linux Network Toolkit". A bit dated by the principles are still valid.

Regarding the CGI part, you are talking about web services. You would have to do some programming (probably involving some interface with a database). I have done php and Java. For beginner you could try php.

paulb
10-15-2001, 09:02 PM
Originally posted by MarkLeong:
<STRONG>
Regarding the CGI part, you are talking about web services. You would have to do some programming (probably involving some interface with a database). I have done php and Java. For beginner you could try php.</STRONG>

I know PHP, some Perl, Basic, C++, ASP, VBScript, JavaScript just to say some of the interprited languages and C++ and VB as compiled. What I was asking was if I can set up a Network server with CGI as I would a Web Server?

BTW. I'll check out that book.

Edit: Ill looks like the roman number 3 but its supposed to be ill.

[ 16 October 2001: Message edited by: paulb ]

Syngin
10-15-2001, 11:15 PM
A plethora of knowledge and help indeed.

I managed to get everything working except the encrypted vs non-encrypted password issue. :)

Could anyone elaborate on that? Its touched on only briefly in the Samba faqs I've seen.

Syngin
10-15-2001, 11:19 PM
Oh, BTW, I noticed that someone mentioned developing. I'd definitely recommend Macromedia's Dreamweaver UltraDev to learn.

It'll do ASP, JSP, ColdFusion and, with the Phakt extension, PHP.

It helps out especially in learning what exactly is involved in database ty-ins etc. The tutorials are invaluable too.

paulb
10-16-2001, 11:37 AM
I dont think that you guys know what I am talking about with CGI stuff!

Say I wrote a program in a CGI language:
(This is just an example, not neccisarily a real language: )

In Ret_Time.dea

int l;
l = date.time;
print ("The time is " & l);


So the client (on the Linux box) would go into a windows network program and click Ret_Time.dea, save it into Ret_Time.dea, and when they open it up it would say:

12:34

because that was the time on my windows box at the time that the file was transfurred???
I KNOW that my windows box would need a .dea interpreter, but can windows do that?

Basically what I am saying is can I remotly execute windows scripts over a network (from my Linux box)