Click to See Complete Forum and Search --> : Redhat8 and win2k Problem
JethroTul
02-20-2003, 06:23 AM
I have 2 PC`s connected to a hub. Both PC`s are on win2k. The first PC acts as a server and has an ADSL modem connected to it. I can share internet and files thru hub easily.
I wanted to test Linux. So I put up my third PC with Linux redhat8. How can I share internet connection on this pc as well ? and how can I send files from a win2k PC to linux ?
my setup is like this
PC 1 :
IP : 192.168.0.1
MASK : 255.255.255.0
Gateway : 192.168.0.1
WORKGROUP name : WORKGROUP
PC 2 :
IP : 192.168.0.2
MASK : 255.255.255.0
Gateway : 192.168.0.1
WORKGROUP NAME : WORKGROUP
I tried on linux machine to put 192.168.0.3 but to no avail and I dont see the workgroup option :(
I did try this :
open the redhat icon and go on system/network
I have device eth0
Nickname eth0 1
activate devices activated
automaticaaly obtain IP addresses from dhcp not activated since am not using dhcp on any machine
Statically set ip adrress activated
con questi settaggi :
address : 192.168.0.3
mask : 255.255.255.0
gateway : 192.168.0.1
in route I put the IP adresses of the various PC`s
Hardware device I changed nothing
In section hardware I have my network card
Hosts :
IP 127.0.0.1
Name : Linux
aliases : localhost.linuxdomain localhost
In DNS window I have nothing.
I tried as well to launch samba config but comes out mozilla with this error :
This connection was refused when attempting to contact 127.0.0.1 :901
Can someone please help me ? I am totally new to LINUX and everything seems strange to me so any good help will be really appreciated :)
Thanks
JethroTul
02-20-2003, 02:12 PM
I tried the netstat -r
I got :
192.168.0.0 : 255.255.255.0
127.0.0.0 : 255.0.0.0
Default :192.168.0.1 :0.0.0.0
Log in as root, or su to root with one of the following commands:
su -
su -l (<- lowercase " L ")
1. Your workgroup name WORKGROUP only applies to Samba; you set that, and other Samba parameters, in your /etc/smb.conf file.
2. In your /etc/hosts file you need entries for 127.0.0.1 (localhost), your Linux machine, and the 2 Windows boxen. The file should look like this:127.0.0.1 localhost.localdomain localhost
192.168.0.1 hostname_of_WinPC_#1.localdomain hostname_of_WinPC_#1
192.168.0.2 hostname_of_WinPC_#2.localdomain hostname_of_WinPC_#2
192.168.0.3 hostname_of_Linux_PC_.localdomain hostname_of_Linux_PC_
3. In your /etc/sysconfig/network, you need the following:NETWORKING=yes
FORWARD_IPV4="no"
HOSTNAME="hostname_of_Linux_PC_.localdomain"
DOMAINNAME=localdomain
GATEWAY="192.168.0.1"
GATEWAYDEV="eth0"
4. In /etc/sysconfig/network-scripts/ifcfg-eth0 you need:DEVICE="eth0"
BOOTPROTO="none"
IPADDR="192.168.0.3"
NETMASK="255.255.255.0"
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT="yes"
5. You might need to manually add the default gateway to your routing table:
route add default gw 192.168.0.1
6. As far as being denied on port 901 when trying to set up Samba:
a. try "localhost:901" instead of 127.0.0.1:901
b. make sure that none of Redhat's firewall/security features are blocking access to port 901
bwkaz
02-20-2003, 02:45 PM
OK, on Windows, when you set the "computer name" and workgroup up, you're not doing basic network configuration. You're doing SMB configuration.
Since you have ICS working on the router machine, you can ping outside IP addresses from the RedHat box, right? For example, Google's IP address is 216.239.51.101, so try to ping that. You should be able to before you go any farther.
If you can do that, then the likely cause of not being able to surf to localhost:901 is that no program is listening on port 901 on your machine; in other words, SWAT is not running. This could either be because it needs to be started, or because it isn't installed, so check both of those. Once you get it running, you should be able to set the workgroup name, etc. from inside SWAT.
JethroTul
02-20-2003, 03:24 PM
hmmm
strange I tried all sorts :) settings seem ok
if I go on mozilla and type that IP for google ...google opens if I type www.google.com nothing happens....
how do I start SWAT ?
I tried with samba same thing with localhost:901
Originally posted by JethroTul
if I go on mozilla and type that IP for google ...google opens if I type www.google.com nothing happens....Woops... I forgot that you said you had no DNS server entries; without them you won't be able to resolve URLs to their IP addresses. You need to put your ISP's domain name and the IP addresses of their name servers into /etc/resolv.conf. As an example, here's my resolv.conf:domain attbi.com
nameserver 216.148.227.68
nameserver 204.127.202.4
nameserver 207.127.126.41
Originally posted by JethroTul
how do I start SWAT ? Instructions are here (http://samba.linuxbe.org/en/samba/learn/swat.html); when you run into references to "inetd" and "xinetd", follow the directions for xinetd; that's what Redhat 8 will be using.
JethroTul
02-20-2003, 04:17 PM
how do you edit READ only files ? am trying to edit swat and resolv.conf but its telling me its read only when I try to save ...am using GVIM as a tool
bwkaz
02-20-2003, 05:33 PM
Start gvim from a root shell rather than a normal user shell. The easiest way to (temporarily) change to a root shell is to do a su and enter the password. When you're done, do an exit to become your normal user.
Originally posted by bwkaz
The easiest way to (temporarily) change to a root shell is to do a su and enter the password. When you're done, do an exit to become your normal user. If that doesn't work, that's because "su" issued by itself does not give you a full root login shell, which some programs require. To gain a full root login shell, run the su command with one of the following options:
su -
su -l
(the " l" in the second command is a lowercase "L")
bwkaz
02-20-2003, 08:50 PM
Well true, but if all he's doing is starting gvim, he won't need root's path and such; he won't need to execute /root/.bash_profile, just /root/.bashrc... ;)
At least, I can't see why he'd need to. But of course, try adding the dash if something doesn't work.
JethroTul
02-21-2003, 06:38 AM
thanks to all finally I am connected to the net :) my problem was that I wasnt logging as root :)
where do I find a good and easy to understand doc on how to setup samba so that I can now access Linux from my win2K machines ?
and from where can I find drivers for my ADSL usb alcatel speed touch modem ?
bwkaz
02-21-2003, 10:27 AM
SpeedTouch modems have drivers, somewhere. I don't know where, but G4L does.
(that's www.google.com/linux ;))
JethroTul
02-21-2003, 12:05 PM
am trying to configure samba .....
all I did at this point was this :
# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2003/02/21 17:01:32
# Global parameters
[global]
server string = LINUX
interfaces = 192.168.0.1/24 192.168.0.2/24
security = SHARE
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*success fully*
unix password sync = Yes
log level = 2
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
guest account = jethro
hosts allow = 192.168.0.2. # 192.168.0.1.
printing = lprng
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[DREAMBOX]
comment = DB
path = /home/dreambox
read only = No
guest ok = Yes
is it OK ? how do I browse win2K files and how do I browse LInux files from win2k ?
yinrunning
02-21-2003, 12:30 PM
is it OK ? how do I browse win2K files and how do I browse LInux files from win2k ?
That's actually two different questions.
For the Win2K box to see the Linux box, keep working with Samba. That makes the Linux box act as another workgroup server. If you just want the Linux box to be able to see the win shares, there's an SMB NHF in the JustLinux NHF Library.
http://www.justlinux.com/nhf/Filesystems