LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-22-2004, 06:34 PM   #1
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Rep: Reputation: 30
help needed with basic networking


I have 2 computers, one running XP and one running RH9 and I want to be able to get them to share files.

I have looked at hundreds of sites and guides and all seem overly complex and over my head and I really need some help.

So far, I have got NICs in both computers and have got them connected. I can ping from one computer to the other,so the hardware seems ok.

I have SAMBA installed on the RH machine but I need help .I don't understand what to do,despite reading lots of articles on it.

Can someone please tell me how to configure the Linux machine and the XP machine so that they can talk to each other?
Please bear in mind that I need simple instructions.


Thanks,
Ludwig
 
Old 01-22-2004, 08:20 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
well if you wanna go with upmost simplicity, you can download something like :
LinNeighborhood
or
xSMBrowser
which are equivalents to the Network Neighborhood, or Network Places that you use in windows ..

and other samba related questions, you can easily find answers by searching this site, cause samba questions are asked all the time ..
 
Old 01-23-2004, 05:28 AM   #3
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Original Poster
Rep: Reputation: 30
Well, the problem I've been having is getting basic file sharing to work.I can't seem to see shared folders between Linux and XP.

Perhaps if I tell you EXACTLY what I have done, someone might be able to help.

1.I went into /etc/samba/smb.conf and edited the following:
workgroup = linux
server string = samba


2. Then I made
hosts allow 192.168.0.1 192.168.0.2
these are the IPs of the 2 computers

3.Then I made a samba password for the user Ludwig (the same password as the login BTW) by doing:
smbpasswd ludwig
and filled in the password

4.I then made sure that:
encrypt passwords = yes


4.I then made a common share directory by editing the smb.conf thus:
[myshare]
comment =ludwigs share
path = /home/ludwig
valid users = ludwig
public = no
writable = yes
printable = no
create mask = 0765



5. I then restarted samba by /etc/rc.d/init.d/smb restart

I then turned my attention to the windows machine.

1. I created a user called 'Ludwig' with the samba/login password from the linux machine

2. I then went to 'My network Places'
and clicked the 'set up a home or small office network'. I called the workgroup 'linux' , as I had on the linux machine and was then sked to restart the computer,which I did.

3.I went back to 'My Network Places' and saw no shared files from the linux machine. Itried 'view workgroup computers' and saw the workgroup 'linux' but whenI clicked it nothing happened.


Can someone help me with this?
I'm sure it's very simple for some of you, but as is always the case with Linux, there are practically no HOWTO's for newbies


thanks,
Ludwig
 
Old 01-28-2004, 10:56 PM   #4
Opto-Andy
LQ Newbie
 
Registered: Jan 2004
Distribution: slackware
Posts: 1

Rep: Reputation: 0
Great Post, I'll be looking for answers from a guru.. (as I share your questions). I have seen reference to a "lisa" daemon that needs to work with samba... Do you know if that is out of date? I did see some security issues related to that as well. If it is not out of date, perhaps if you continue your efforts and also look into "lisad" you will solve your problem and can post back here!

=Thanks,

Andy
 
Old 01-29-2004, 12:04 PM   #5
aclaunch
Member
 
Registered: Sep 2003
Posts: 91

Rep: Reputation: 15
Check the "Create mask" section of your smb.conf. Usually, this is the umask and if so, it is the opposite of what you want the permissions to be. In other words, full permissions are 777; this is a umask of 000 (7-0=7). A umask of 022 gives permissions of 755 (777-022=755). If this is what is wanted in the smb.conf, then a umask of 765 doesn't give enough permissions to do anything.

Also look at these turorials:

http://www-106.ibm.com/developerwork...ry/l-sambaint/
http://www-106.ibm.com/developerwork.../l-samba2.html
http://www-106.ibm.com/developerwork.../l-samba3.html

These are some of the best tutorials I have read on setting up Samba.

Good Luck,
Alan
 
Old 01-30-2004, 05:33 PM   #6
Megamieuwsel
Member
 
Registered: Sep 2002
Location: Haarlem , the Netherlands
Distribution: VectorLinux SOHO 5.1
Posts: 470

Rep: Reputation: 35
Quote:
Also look at these turorials: http://www-106.ibm.com/developerwor...ary/l-sambaint/ http://www-106.ibm.com/developerwor...y/l-samba2.html http://www-106.ibm.com/developerwor...y/l-samba3.html These are some of the best tutorials I have read on setting up Samba.
*clicks links*
....
*browses the articles*
....
*prints the articles out*

Thanks man!
That was just what I needed! []
 
Old 01-31-2004, 03:51 PM   #7
AfterBurn
LQ Newbie
 
Registered: Oct 2003
Distribution: Red Hat 9
Posts: 24

Rep: Reputation: 15
you may have to download a NTFS module for NTFS file support to read the NTFS disks on XP.
 
Old 01-31-2004, 04:03 PM   #8
ludwig W
Member
 
Registered: Mar 2003
Posts: 404

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Opto-Andy
Great Post, I'll be looking for answers from a guru.. (as I share your questions). I have seen reference to a "lisa" daemon that needs to work with samba... Do you know if that is out of date? I did see some security issues related to that as well. If it is not out of date, perhaps if you continue your efforts and also look into "lisad" you will solve your problem and can post back here!

=Thanks,

Andy
Ok, Andy, here is how I finally got the thing to work.
Took me several weeks and the advice of several people on JustLinux forums:

1.First set up the NICs and give each computer an IP address.
We will give the Linux machine an IP address of 192.168.0.1 and the XP machine an IP address of 192.168.0.2

For XP,
1.Go to START/CONNECT TO /SHOW ALL CONNECTIONS and right click the LAN and choose properties.
2.Highlight the TCP/IP and choose properties.
3.Use the following IP address: 192.168.0.2
4.Subnet mask: 255.255.255.0
5.Use the machine as the DNS server. i.e put in the ip of 192.168.0.1
6Make sure Client for Microsoft Networks ,File and Printer Sharing for Microsoft Network and QoS packet scheduler is installed.
6.Now go to Folder options (control panel) and untick simple file sharing
7.Choose a folder you want to share ,right click it and choose properties/sharing
Choose ‘share this folder’ and then click the ‘permissions’ button and tick all the ‘allow’ boxes for the user ‘everyone’.
8.Now go to Network Connections in the control panel and choose ‘set up a home or small office network’ Go through the wizard and choose a name for the network.By default it will be called WORKGROUP.For this example,we will call it ‘network’
9.Finally we need to give the XP computer a name that we can refer to it as.Right click MY COMPUTER and choose the computer name tab and click change to give a name you prefer

That’s pretty much it for XP.


For LINUX

1.Load the ‘network configuration tool’ (this is what it is called in RH9.) .You should see your NIC (ethernet) card there identified as an Ethernet
2. Highlight it and choose edit
3.On the general tab,chooseActivate device when computer starts
4.Choose:statically set IP addresses and set the IP address as 192.168.0.1
And set the subnet mask as 255.255.255.0
5.On the route tab choose Add and put in the IP of the XP machine (192.168.0.2) and the netmask.
6.You might be asked for a hostname.This is ‘localhost’
That’s the NIC set up for linux.

Now for Samba itself:

1.We first have to set up the samba server.
2.Make sure Samba is installed on RH9.If not install it from the CDs (use add/remove programs)
3.To get Samba to work ,all the configuration is done via the smb.conf file which is in /etc/samba
4.A basic one is one I made:

[global]
workgroup = network
username map = /etc/samba/smbusers
guest ok = yes
netbios name = samba
encrypt passwords = yes
comment = Linux PC





[ludwig data]
comment = ives home folder
path = /home/ludwig/data
writeable = yes
browseable = yes
read only = no


Some explanations:
Under global (i.e. the whole of Samba)
Workgroup is the name of the Network all the computers use the same workgroup name
Username map is the place where samba users are stored
Netbios name is the name of the server
Encrypt passwords is important for XP
Under ludwig data, we give the path to the folder that will be shared with XP.Remember to make this directory available to all by: # chmod 777 /home/ludwig/data
Writable, means that XP can write to this folder, browseable means you can browse it and read only = no means just that.

5.Now you must create a samba user:
# smbpasswd -a ludwig
New SMB password:
Retype new SMB password:
Added user ludwig
Now restart samba by:
# /sbin/service smb restart

It’s a good idea to make your samba user and pw the same as your linux login and the same as your windows login unless security is ultra important for you.

6.You can test the syntax of your smb.conf file by # testparm.
Any errors will be reported.
Alternatively, you can use the ‘samba server configuration tool’ that comes with RH9.It’s like the SWAT tool that comes with samba and gives you a nice GUI to make the smb.conf.Note, you should check the smb.conf file afterwards and add the netbios name = samba line.I had problems since the samba server configuration tool didn't add this line and it caused problems.

7.To test that samba is set up ok, do as root:

#/usr/bin/smbclient -L samba -U ludwig
Where samba is the netbios name and ives is the user you created.Your samba password will be asked for.You should get something like:
Sharename Type Comment
--------- ---- -------
savefile Disk
IPC$ IPC IPC Service (Dell Dimension 8200)
ADMIN$ IPC IPC Service (Dell Dimension 8200)

Server Comment
--------- -------
DELLDIM Dell Dimension 8200
PE500SC

Workgroup Master
--------- -------
THE_COWANS PE500SC

If you get something like the above, you are in business.and samba is working ok


Now, from XP you should be able to open network neighborhood and go to ‘view workgroup computers’. You should see your Linux and XP computer there.Double click the Linux one and it will ask you for your samba username and pw.Then ou will get to the share you designated in the smb.conf (/home/ives/data). You should be able to read and write to it.

From Linux, in order to access your shared files on XP you need to do the following:
We need to use the smbmount command to mount the share.

1.Create a mount directory.For example /mnt/xp
2.Suppose the file you have shared on XP is called movies and under the sharing tab ,you have given this folder the share name D_Movies
Then one would do:
# smbmount //xp/D_Movies /mnt/xp
Where ‘xp’ is the name you gave your windows machine
D-Movies is the name you gave to the shared file and
/mnt/xp is the mount directory (the place where the files will show up)

To unmount the mount, just do:
#smbumount /mnt/xp

Making the Mount Permanent
smbmount does not make the mount permanent. If the Linux workstation is rebooted, you will have to mount the share again. To make the mount occur each time you start the Linux workstation, you can put an entry in your /etc/fstab file of the form:
//servername(i.e. the name of the XP computer)/sharename (i.e. name of shared file in XP) /mountdirectory smbfs username=windowsuserename,password=windowspassword 0 0

For example:
//xp/My_XP_Docs /mnt/xp smbfs username=defaults,password=defaults 0 0

the username and password are only needed if the Windows share is set up to require them. If a username and password are not required, you may just replace them with the word defaults.

Last edited by ludwig W; 01-31-2004 at 04:12 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
basic networking Qs thick_guy_9 Slackware 2 07-15-2005 11:52 AM
BAsic networking abc249 Linux - Networking 5 05-19-2003 01:00 AM
basic networking sadiboyz Linux - Networking 3 04-23-2003 03:21 AM
Very basic networking TheSockMonster Linux - Networking 5 05-24-2002 06:31 PM
Need help with basic networking Korshun Linux - Networking 11 04-03-2002 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration