Networking between Win98SE and RedHat 6.1

Posted on 2001-06-16
Medium Priority
Last Modified: 2010-03-18
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.
Question by:bass2k1

Expert Comment

ID: 6198049
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:


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


Expert Comment

ID: 6207193
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.

Author Comment

ID: 6207775
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.


Author Comment

ID: 6207782
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

Expert Comment

ID: 6207939
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.

Expert Comment

ID: 6207990
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

Author Comment

ID: 6208117
Am I able to connect to any other FAT based hard drives in the same machine i.e. my windows partitions from LINUX?

Expert Comment

ID: 6208467
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:
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!!

Author Comment

ID: 6211434
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 -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.....

Expert Comment

ID: 6211867
"..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
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.


Expert Comment

ID: 6211902
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:

Author Comment

ID: 6212135
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

Accepted Solution

tibori earned 800 total points
ID: 6212350
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:

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.


Expert Comment

ID: 9078779
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 
Post your closing recommendations!  No comment means you don't care.

Expert Comment

ID: 9976012
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.

EE Cleanup Volunteer

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month17 days, 3 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question