LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 06-04-2004, 11:32 PM   #1
shaneblyth
Member
 
Registered: Sep 2003
Location: Queenstown New Zealand
Distribution: Mepis , Linspire, Xandros.
Posts: 41

Rep: Reputation: 15
what the best way to set this network up ?


I have a netgear Router which i use as a dhcp server for ip addresses
I have no Computer as any sort of server as it is a small home network and any of them can be off at anytime.
1 have 3 pc's one is dual booting Mepis and Suse One is dual booting Suse and windows XP and one runs Linspire.

I need to know what I need up and running for this sort of network to run.
Looking under Suse 9.1 pro for instance i have a bunch of Network services such as samba client samba server, NIS and NFS DHCP and DNS
what actually needs to be setup and running and what doesnt.
In this system all of the OS's have no trouble using the netgear Router to get internet access so it is partially running.
i am teariong my hair out here can someone give me some hints on where to start?

cheers
 
Old 06-05-2004, 02:22 AM   #2
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
Well, it seems your network is already running, so I didn't understand what's the problem. The three computers have an OS. Do you plan to remove any, or are you adding a new computer to the network?
If the router can dhcp, there's no need for a server, indeed. Dhcp is quite a robust and old protocol, every distro can handle it very well.
 
Old 06-05-2004, 03:40 AM   #3
lacerto
Member
 
Registered: Oct 2003
Location: South London
Distribution: Gentoo.
Posts: 297

Rep: Reputation: 30
I agree - you network seems to be working. I assume then that you want to share files/services across it??

To share the files between the Linux machines you could use NFS. Yast does a very good job for SUSE - you will just need to setup NFS client and server on each machine that you want to read/write to.

The Linux machines should be able to read/write directly to your Windows machines I think, though I'm not sure how stable the NTFS read/write capability is these days. You may be better off using Samba client for this.

To be able to read/write from Windows, you will need to setup Samba servers on the Linux machines.

I use a combination of both kernel mounting(for FAT32) from Linux, Samba(NTFS) for Windows reading.writting to Linux and NFS between Linux machines.
 
Old 06-05-2004, 04:17 AM   #4
shaneblyth
Member
 
Registered: Sep 2003
Location: Queenstown New Zealand
Distribution: Mepis , Linspire, Xandros.
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by lacerto
I agree - you network seems to be working. I assume then that you want to share files/services across it??

To share the files between the Linux machines you could use NFS. Yast does a very good job for SUSE - you will just need to setup NFS client and server on each machine that you want to read/write to.

The Linux machines should be able to read/write directly to your Windows machines I think, though I'm not sure how stable the NTFS read/write capability is these days. You may be better off using Samba client for this.

To be able to read/write from Windows, you will need to setup Samba servers on the Linux machines.

I use a combination of both kernel mounting(for FAT32) from Linux, Samba(NTFS) for Windows reading.writting to Linux and NFS between Linux machines.
Yes the internet works
No file sharing doesnt ...
So i need NFS client and server on each PC.. interesting I didnt realise i need to set it up like that..
I only had samba client running. so i need samba client and server on each pc too if I want to talk to the windows unit..?
I was not too sure if Samba alone worked linux to Linux so I will install and setup NFS client/server on each and see how it goes..
I am familiar with windows networks only..
thanks for your help is there anything i need to be careful of say as far as workgroup naming or the like ?
it is mainly that one pc has to duel boot windows and linux... it is a pain but i use that pc to serve divx's to the tv set and have never had any success in getting linux to display on TV at the correct size... I only get to see a portion of the overall picture..

cheers for your help
 
Old 06-05-2004, 04:36 AM   #5
lacerto
Member
 
Registered: Oct 2003
Location: South London
Distribution: Gentoo.
Posts: 297

Rep: Reputation: 30
Actually, you only need the samba client to read from the Windows box - but need Samba server to ready 'Linux' filesystem from Windows
 
Old 06-05-2004, 07:40 AM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Well, that was a mistake. Read the below and ignore this... where's the "delete this post" button around here?

Last edited by motub; 06-05-2004 at 07:44 AM.
 
Old 06-05-2004, 07:42 AM   #7
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Quote:
Originally posted by shaneblyth
I only had samba client running. so i need samba client and server on each pc too if I want to talk to the windows unit..?
Windows includes its own Samba server within the OS. So you only need the client on the Linux PC to receive Windows shares. You need the Samba server on the Linux PC if you want to share files back, but unless you have a FAT32 or NTFS partiton available to share, it doesn't matter, as Windows cannot see or recognize files on Linux filesystems.

Quote:
Originally posted by shaneblyth
is there anything i need to be careful of say as far as workgroup naming or the like ?
Well, despite the fact that you're only familiar with Windows networks, networking is the same everywhere, in principle... and the principle that applies here is that all computers on the network should be part of the same workgroup, since that's the point of workgroups in the first place .

So you should be careful to use the same workgroup name during the network setup of all computers, no matter what OS they're running.

Hope this helps.
 
Old 06-05-2004, 01:22 PM   #8
shaneblyth
Member
 
Registered: Sep 2003
Location: Queenstown New Zealand
Distribution: Mepis , Linspire, Xandros.
Posts: 41

Original Poster
Rep: Reputation: 15
thanks
can someone clarify this for me
as this system has 1 pc that runs either winxp or suse on a dual boot (and this is the reason then I need samba running on the system)
do i need th nfs client server running as well or will samba client servers on Linux machine work linux to linux.. what i am asking is do i need all 4 serveices running then....

thanks so much for everyones help I really appreciate it.. I will have a go att his this afternoon.. cant wait to finally get it sorted...
 
Old 06-05-2004, 01:56 PM   #9
lacerto
Member
 
Registered: Oct 2003
Location: South London
Distribution: Gentoo.
Posts: 297

Rep: Reputation: 30
You can use Samba "Linux to Linux" so to speak, but NFS would be more the norm.

NFS server - to make file system available available to another machine.
NFS client - to connect to an NFS server

So if you wanted to access each machine from the other, you would indeed need NFS client and Server on both.
 
Old 06-05-2004, 02:49 PM   #10
andrewdodsworth
Member
 
Registered: Oct 2003
Location: United Kingdom
Distribution: SuSE 10.0 - 11.4
Posts: 347

Rep: Reputation: 30
You can actually use Samba to browse windows AND linux. For instance I use a linux machine (Suse9.0 KDE3.1) as my main server, it runs Samba server which allows windows machines to login and see the resources I share but on its desktop if I click on the Local Network icon I can not only see the windows machines but also my linux Samba server. Therefore if you want just to share specific data areas of each machine whatever the environment, set them up on the windows partition but then also share them using Samba from linux. That way whatever operating system you boot you will be able to share the same data areas.
 
Old 06-05-2004, 08:57 PM   #11
shaneblyth
Member
 
Registered: Sep 2003
Location: Queenstown New Zealand
Distribution: Mepis , Linspire, Xandros.
Posts: 41

Original Poster
Rep: Reputation: 15
getting there

I am getting there... thanks for the help so far...
I used Yast to add some shares but I cannot access them .. even on the same machine I get cant resolve address if i use Linneighborhood.
I orignal share works though..

I assume I can change the samba.conf file to fix this manually.. though I would like to know why it didnt work with Yast.

Below is my samba.conf file.. what is working is the documents section share but the other shares included "c" "d" "e" "data1" are not... I need to be able to read and write to all these shares from any pc without the need to put in passwords.. the network doesnt need to be secure internally Only protected from the web which is through my netgear router/firewall anyway...... thanks again

# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SuSE
# Date: 2004-04-06
[global]
workgroup = MSHOME
interfaces = 127.0.0.1 eth0
bind interfaces only = true
printing = cups
printcap name = cups
printer admin = @ntadmin, root, administrator
map to guest = Bad User
security = share
encrypt passwords = yes
passdb backend = smbpasswd
server string = Samba Server
add machine script =
domain master = false
domain logons = no
local master = no
preferred master = auto
ldap suffix = dc=example,dc=com
netbios name = AMD

[homes]
comment = Home Directories
valid users = %S
browseable = no
read only = No
guest ok = no
printable = no
[users]
comment = All users
path = /home
writeable = Yes
inherit permissions = Yes
veto files = /aquota.user/groups/shares/
browseable = yes
guest ok = no
printable = no
[groups]
comment = All groups
path = /home/groups
writeable = Yes
inherit permissions = Yes
browseable = yes
guest ok = no
printable = no
[pdf]
comment = PDF creator
path = /var/tmp
printable = yes
print command = /usr/bin/smbprngenpdf -J '%J' -c %c -s %s -u '%u' -z %z
create mask = 0600
browseable = yes
guest ok = no
[printers]
comment = All Printers
path = /var/tmp
printable = yes
create mask = 0600
browseable = no
guest ok = no
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
browseable = yes
guest ok = no
printable = no
[documents]
path = /home/shane/Documents
comment = /home/shane/Documents
writeable = yes
create mask = 0640
force user = shane
public = yes
guest ok = yes
wide links = no
browseable = yes
printable = no
[c]
comment = C
path = /windows/C/
browseable = yes
guest ok = no
printable = no
[d]
comment = D
path = /windows/D/
browseable = yes
guest ok = no
printable = no
[data1]
comment = Data1
path = /data1/
browseable = yes
guest ok = no
printable = no
[e]
comment = E
path = /windows/E/
browseable = yes
guest ok = no
printable = no
 
Old 06-05-2004, 09:21 PM   #12
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
What I notice about your other shares is that they are in locations that any "outside" users would not normally have permissions to.

So what you most likely need to do is add the users who would be connecting to these files as users on your system (using either the adduser command, or any user management tool provided by your distro, GNOME or KDE). If you use the same username and password as they have under Windows, when they log in there, they'll be logged in halfway on the Linux end. You will also want to make them members of the "users" group, or whatever group that you are a member of that allows you to have full access to those folders (different distros often deal with group names differently). The second part is that you must (as root) use smbpasswd -a -e <username> <user's_password> to add and enable each of these users as users of the Samba services.

As long as your network and file sharing authenticaton is properly set up, this should allow any authorized network user who has been so added to just click on Network Neighborhood and browse to the folders shared from the Linux computer.
 
Old 06-05-2004, 09:37 PM   #13
shaneblyth
Member
 
Registered: Sep 2003
Location: Queenstown New Zealand
Distribution: Mepis , Linspire, Xandros.
Posts: 41

Original Poster
Rep: Reputation: 15
Dont really follow what you mean here.. I have the same login and password on all my systems
when i try to access these "shares" from the same pc with the same user it wont let me... asks for authentication and a user name and password which doesnt seem to work... as i siad this is locally I have the same issue from the other machines trying to access these.. cannot not simply make these sahre accessable to all users somehow.. as I said security is no issue as all pc's are in my house and I am the only person living there.

Quote:
Originally posted by motub
What I notice about your other shares is that they are in locations that any "outside" users would not normally have permissions to.

So what you most likely need to do is add the users who would be connecting to these files as users on your system (using either the adduser command, or any user management tool provided by your distro, GNOME or KDE). If you use the same username and password as they have under Windows, when they log in there, they'll be logged in halfway on the Linux end. You will also want to make them members of the "users" group, or whatever group that you are a member of that allows you to have full access to those folders (different distros often deal with group names differently). The second part is that you must (as root) use smbpasswd -a -e <username> <user's_password> to add and enable each of these users as users of the Samba services.

As long as your network and file sharing authenticaton is properly set up, this should allow any authorized network user who has been so added to just click on Network Neighborhood and browse to the folders shared from the Linux computer.
 
Old 06-05-2004, 09:53 PM   #14
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Sorry, now I don't really follow you.

What do you mean, "when you try to access these shares from the same PC as the same user"? The whole idea of Samba networking (indeed, any networking) is that you're trying to access shared files on one PC from a different PC.

If you're trying to access Linux files from a dual-boot with Windows on the same PC... well, you can't, and if you're trying to access the Windows files on the same PC when you're booted into Linux, all you have to do is mount the Windows partitions in question.

I presume that you have a different username and password when you log onto Windows from one of your other computers than the one you use when you log into Linux on the one with the Samba server in question.

The Samba server needs to know who is allowed to use it, because it won't allow people it doesn't know to read the files that it is sworn to protect. So the idea is that you have to tell Samba that the user names and passwords trying to connect from the other PCs are allowed to see the files.

First of all, they have to be known to Linux. That is why the Windows usernames and passwords must be added to the known user list via adduser, because Samba won't listen to anyone who isn't even known to the OS as a whole. You then have to tell Samba that, of the users known to the OS as a whole, certain specific ones are allowed to see the Samba shares. This is done by adding the Windows usernames and passwords to the known Samba user's list, with smbpasswd.

What normally happens when one connects to a network share is that one is authenticated as a known user with permission to be shown the files. Authentication normally sends the login name and password of the currently logged in user requesting the share; this process is invisible to you. If the username and password of the currently-logged in user requesting the share is not acceptable/unknown/not permitted, the OS will ask you for another username and password which does have the proper permissions (which is why you get a username/password dialog).

However, if the username and password is already known to both the OS and Samba (via adduser and smbpasswd), the default authentication will work, and the shares will be displayed normally, without the need for further authentication.

Last edited by motub; 06-05-2004 at 09:55 PM.
 
Old 06-05-2004, 10:54 PM   #15
shaneblyth
Member
 
Registered: Sep 2003
Location: Queenstown New Zealand
Distribution: Mepis , Linspire, Xandros.
Posts: 41

Original Poster
Rep: Reputation: 15
I mean in Suse trying to access the share i created in suse on the same pc (not duel booted) under the samba network loged in as the same user it wont let me access them... I know you cant access if you have booted to another os.
If it wont access off the original machine and user in same os it isnt going to be accessible from another machine in the network.. hoe that makes it clearer. The windows partitions are mounted on the same pc and of course you can access them that way easily enough but through samba.. no

No I login to all machines in the network with the same login name and password as they are all my machines and i am the only user.

Quote:
Originally posted by motub
Sorry, now I don't really follow you.

What do you mean, "when you try to access these shares from the same PC as the same user"? The whole idea of Samba networking (indeed, any networking) is that you're trying to access shared files on one PC from a different PC.

If you're trying to access Linux files from a dual-boot with Windows on the same PC... well, you can't, and if you're trying to access the Windows files on the same PC when you're booted into Linux, all you have to do is mount the Windows partitions in question.

I presume that you have a different username and password when you log onto Windows from one of your other computers than the one you use when you log into Linux on the one with the Samba server in question.

The Samba server needs to know who is allowed to use it, because it won't allow people it doesn't know to read the files that it is sworn to protect. So the idea is that you have to tell Samba that the user names and passwords trying to connect from the other PCs are allowed to see the files.

First of all, they have to be known to Linux. That is why the Windows usernames and passwords must be added to the known user list via adduser, because Samba won't listen to anyone who isn't even known to the OS as a whole. You then have to tell Samba that, of the users known to the OS as a whole, certain specific ones are allowed to see the Samba shares. This is done by adding the Windows usernames and passwords to the known Samba user's list, with smbpasswd.

What normally happens when one connects to a network share is that one is authenticated as a known user with permission to be shown the files. Authentication normally sends the login name and password of the currently logged in user requesting the share; this process is invisible to you. If the username and password of the currently-logged in user requesting the share is not acceptable/unknown/not permitted, the OS will ask you for another username and password which does have the proper permissions (which is why you get a username/password dialog).

However, if the username and password is already known to both the OS and Samba (via adduser and smbpasswd), the default authentication will work, and the shares will be displayed normally, without the need for further authentication.
 
  


Reply



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
What will I need to set up a network? rammstein Linux - Networking 5 08-29-2005 06:52 PM
Set up the network aje Linux - Networking 1 11-08-2004 09:37 PM
How to Set up a network? scahrossar Linux - Newbie 2 10-09-2003 05:15 PM
how to set up a network?? dARkHunTEr Linux - Networking 19 08-02-2003 04:16 PM
Network set up Help bad1drums Linux - Networking 4 04-08-2003 08:39 PM

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

All times are GMT -5. The time now is 07:53 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