• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

Networking between Win98SE and RedHat 6.1

I am VERY new to Linux and I need to set up a simple peer-to-peer networking using a cat-5 crossover cable and 2 NIC's. I need to know how to configure my RedHat to "see" and share files with my windows-based machine and vice versa.

Like I said I am VERY new to Linux, and the more "step-by-step" information I can get the better.

The NIC I have in my RedHat box is a 3Com EtherLink 10/100 PCI card (3c905c-TX).

Thank you in advance.
0
bass2k1
Asked:
bass2k1
1 Solution
 
vsamtaniCommented:
There are two issues here. First of all, have you got as far as configuring the nic in your linux box? Can you ping the windows box from the linux box or vice-versa? If not, you need to configure the network so that you can ping one box from the other, and I'll happily help with that if need be.

Once the two computers can ping each other, you will need to install (if it isn't already) and configure samba on the linux box. Samba allows a Linux box to share resources such that Windows clients can access those resources, and vice versa. RedHat distributions include samba as an rpm (Redhat package manager) file - you need to do is install the rpm from your cd if it's not already installed, and then edit the /etc/smb.conf according to the instructions in the howto document:

http://www.linuxdoc.org/HOWTO/SMB-HOWTO.html

Keep posting comments here if you have specific problems with steps in the howto and we'll try to help.

Vijay
0
 
tiboriCommented:
1. Run netconf(or netconfig in X) to set up networking using a "graphical" interface. You shouldn't have a problem with 3com cards as they're well supported by Linux. You can run the commands /sbin/ifup and /sbin/ifdown to bring the network card up(ie. start it) or down(stop it) without having to restart. You can also use "ifconfig" to assign IP and check the status of the card. Once you have it to the point where you can ping one from the other, then for file sharing(and having the Linux box appear in Nethood") you need to install samba. But first let's check if you already have it installed:
Type: rpm -q samba
If this gives you a version number somthing like: samba-2.0.7-21ssl  then it means it's already installed.
If it is then you just have to start it:
As root type: /etc/rc.d/init.d/smb start (to become root type su and then the password when prompted)
Once you start it, even though you haven't yet configured it you should see the machine on your Windows box(under network neighborhood)
To configure samba, you have to set up shares on it. This is done through the /etc/samba/smb.conf file. You also have to set up users that can access those shares. this can be done via the smbpasswd utility, or the smbadduser utility. To read more about a specific utility you can look at it's manual page:
type: man <commandname> ex: man smbpasswd
Let me know what point you're at, and I can give more instructions from there.
0
 
bass2k1Author Commented:
I am able to ping between the 2 hosts, but whenever I want to connect to a share from the Windows machine I get a prompt for a password. Is this the same password that I use to log into my LINUX box, or is it something else? Whenever I type in my password (the one I use to log into my box), I get the message that it is not the correct password.

Do I need to configure my Windows machine in any way to have it participate on the network?

Thank you in advance
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
bass2k1Author Commented:
I am able to ping between the 2 hosts, but whenever I want to connect to a share from the Windows machine I get a prompt for a password. Is this the same password that I use to log into my LINUX box, or is it something else? Whenever I type in my password (the one I use to log into my box), I get the message that it is not the correct password.

Do I need to configure my Windows machine in any way to have it participate on the network?

Thank you in advance
0
 
tiboriCommented:
The problem in this case is that Linux by default is configured for plain text passwords and Windows by default is configured for encrypted password. You need to enable "encrypted passwords" in your smb.conf file, restart samba, and then add users using smbpasswd -a. Alternately, you could go with plain text passwords, by adding the registry key usually found in /usr/share/doc/samba-2.x.x/docs/Win98_PlainPassword.reg
to your Windows machine and restarting windows.(you can add the key manually, or just copy the file and run it under Windows) I would recommend the first method.
0
 
tiboriCommented:
to enable encrypted passwords take the comment off of the following lines in /etc/samba/smb.conf

encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
0
 
bass2k1Author Commented:
Am I able to connect to any other FAT based hard drives in the same machine i.e. my windows partitions from LINUX?
0
 
tiboriCommented:
Yes, there are two ways to do it. One is an FTP-like transfer that you can connect to your windows shares with called smbclient. It is used as such:
smbclient //machinename/sharename -U username
To simply look at the available shares(analogous to Network Neighborhood) you can type: smbclient -L <servername>
You can also mount a shared drive(similar to mapping to a drive) by using the command:
mount -t smbfs -o username=<username>,password=<password>,rw
//machinename/sharename <mountpoint>

Samba is very versatile!! BTW, if you haven't found it already, there's a web based configuration tool called SWAT built in. If you have Apache(web server) installed on your machine, you can point a web browser from any machine on your network to:
http://machinecontainingsamba:901
and log in as root, and you'll see all of the configuration options that are contained in smb.conf in a GUI format. Pretty cool!!
0
 
bass2k1Author Commented:
Ok, so I have installed my Samba and whenever I type the following:

smbclient -L localhost -U root

I am prompted for my password, and after typing that in and starting the smb engine, I am able to view all my LINUX partitions, so I guess as far as setting up the shares go, I have done that right (or have I).

I have the following statement in my smb.conf file:

encrypt passwords = yes
smb passwd file = smbpasswd

but I am still not able to connect from my Windows box. My LINUX box also doesn't appear in the Net-Hood on my Windows box. Also, I cannot connect to my Windows box's IP using the smbclient utility. The command I use is:

smbclient -L 192.168.0.2 -U root

Is that correct? It probably isn't since I know nothing of this :-)

Then, as far as connecting to my FAT-based partitions from LINUX, do I need to mount them before I am able to view them, and how do I do that? My "C:" drive under Windows is hda1, and my "D:" drive is hdc5. Based on this information, how do I get them to show up when I use the smbclient utility?

Once again thank you very much, and sorry for all the lame questions.....
0
 
tiboriCommented:
"..am prompted for my password, and after typing that in and starting the smb engine, I am able to view
all my LINUX partitions, so I guess as far as setting up the shares go, I have done that right (or have
I)."
YES, if you can see your shares locally that means you have them set up correctly. You can event connect to them(instead of just listing them) to verify it. But usually if they list, it means they're OK.
-------
"smb passwd file = smbpasswd"

1. I would give the full path in this case:
smb passwd file = /etc/samba/smbpasswd

although this may not matter. Check though, if the file smbpasswd is in /etc/samba/.
2. Have you restarted samba after making the changes?
3. Have you added users to samba who can access the shares?
If not use smbpasswd -a to add a user. This user of course has to be on the system already, and must have access to the share(configured via smb.conf)

-----
To connect to the Windows shares from Linux, you need to use a username that's valid in Windows:
smbclient -L machinename -U administrator(or any other user that has an account on the Windows system)
Now, one thing I forgot to mention is that you should use "user level access" on the Win98 box(Control Panel->Networking->?Access Level?(it's the last tab under networking). Once you've done that, then you can set up users and access. You may be able to go with share level access too...I'll try to find out more information on that.
------------------
Linux natively supports FAT and FAT32 so you don't need to go through samba to view them on a local drive.
 Mounting a FAT drive natively:
As root type: mount -t msdos <drive> <mountpoint>
Where <drive> is /dev/hda1 or /dev/hdc5 and <mountpoint> is a directory where the contents of the drive will appear. By convention drives are mounted to /mnt . So if you create a directory under /mnt called "cdrive"(mkdir /mnt/cdrive) for example then you can mount the contents of your C Drive to this point by:
mount -t msdos /dev/hda1 /mnt/cdrive
To avoid having to do this each time(ie. mount it automatically during boot) you can place an entry for this drive in the file /etc/fstab. Let me know if you'd like to do that, and I'll send instructions.

0
 
tiboriCommented:
A couple more things:
1. the Workgroup directive in smb.conf needs to be the same as the workgroup that the win98 machine is in.
2. You can use share level access:
http://samba.linuxbe.org/en/samba/config/share-1.html
0
 
bass2k1Author Commented:
Ok, yes, I think I will like it better if my FAT hard drives were automatically mounted, so could you please explain to me how to do that.

Another thing i wanted to ask was how to set up my dial-up adapter to be able to browse the internet, and also how to configure my LINUX box to act as a gateway for my Windows box i.e. to share my connection between the two boxes.

I understand that the last statement is a question by itself, so i will be adding another 50 pts if you can help me with the whole internet thing.

Thank you very much
0
 
tiboriCommented:
Ok, first about the mounting:
First I would do the manual mounting(described in my previous post) to make sure that everything works. Then you can add an entry with the following parameters into the file /etc/fstab:

<devicename>   <mountpoint>   <filesystemtype> <options> <dumpvalue> <fsckvalue>

You can read the fstab manual(type: man fstab) to get more detail on each of these parameters. Also, the fstab file will contain entries for your currently mounted filesystems(basically your linux partitions by default)
For your case(provided that you've already created the mountpoint directory under /mnt) your line would be:

/dev/hda1       /mnt/cdrive     msdos    defaults  0 2
/dev/hdc5       /mnt/ddrive     msdos    defaults  0 2

The defaults directive sets the drive up with the following parameters:  rw, suid, dev, exec, auto, nouser, and async.
Take a look at "man mount" for a detailed explanation of what each of these mean. "man fstab" will explain the last two entries as well. Anyhow, if you're not interested in learning the details, just type the line given above into /etc/fstab and restart and you should see the contents of your C drive under /mnt/cdrive. If you are interested in the details, read the man pages and let me know if you can't understand something in there.
-----------------
For internet access, I usually use kppp(included with KDE) to establish a ppp connection. It should work under GNOME too, although I think GNOME has its own tool. To share your internet connection, I would set up IP masquerading(using IP chains) and routing between the eth0 and ppp0 devices. Take a look at:
http://www.radiomind.com/soholinux/gateway.html
OR
http://www.cju.com/classes/ITI481-12/linuxhome.html

for some fairly thorough explanations of how to set up linux as a gateway. If there's something you can't understand in either of these let me know.

0
 
CleanupPingCommented:
bass2k1:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
majorwooCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: tibori {http:#6212350}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

majorwoo
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now