LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-14-2013, 03:01 PM   #1
TheOne...More
Member
 
Registered: Jun 2008
Posts: 30

Rep: Reputation: 0
unable to create ubuntu home network


hi all

i'm trying to make an home network between a couple of ubuntu boxes through ethernet. i installed samba and enabled sharing of some folders yet the windows network folder shows only local folders to the box.

any ideas what i did wrong?

thanx

Last edited by TheOne...More; 08-14-2013 at 03:09 PM. Reason: do some changes
 
Old 08-14-2013, 03:54 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,048

Rep: Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624Reputation: 2624
Your post is a little confusing. You starting saying you are trying to make a home network between Ubuntu systems and then mention windows. Is it multiple Ubuntu computers and windows? or just Ubuntu? nfs is usually used between Linux machines.
 
Old 08-14-2013, 03:54 PM   #3
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
you need more details then what you provided.

why are you using SAMBA to connect a couple of LINUX computers? never use an interpreter when you can use native. for connecting Linux to Linux shares use NFS.

2nd you are mixing connecting a couple of Ubuntu (linux) boxes through ethernet and Windows network folders, so what is it? are you trying to use Linux to connect/share files with MS Windows, or Linux to Linux only, or a combination of the two?

You have not posted any error messages, nor have you posted exactly the steps you have taken to get any kind of sharing working.

details details details my friend. the more the better and the better the response will be.
 
Old 08-14-2013, 04:44 PM   #4
TheOne...More
Member
 
Registered: Jun 2008
Posts: 30

Original Poster
Rep: Reputation: 0
sorry my bad.

yes what i'm trying to do is connecting ubuntu boxes only, but i used samba cause when ever i googled for creating ubuntu home network, samba kept haunting the results, i just followed through.

but if there is a simpler way please tell me how.

so as to what the steps i followed. i tryed the gui simple way at first, i select the folders i wanted to share, right clicked, chose shares, enabled sharing, a popup dialog box appeared asking whether i wanted to install samba or not, i agread and it installed samba. after that i installed samba system configuration gui tool. i set on each box the user to ubuntu, and chose the folders i wanted to share, and restarted both boxes.

what happened is what i told before, in each box only the local shared folders appeared, and not the other box.
 
Old 08-14-2013, 05:41 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
Unless you plan on expanding this share to Windows, you should abandon Samba and switch to NFS. It's native, much better supported, and is much easier to configure.

In my opinion you should also try to avoid using GUIs for this kind of thing. They rarely set the system up properly, and just end up garbling the config files.

For NFS, you'll need to make sure it's allowed in the firewall and started on boot. You'll need to make sure your /etc/hosts.allow and /etc/hosts.deny are not blocking the other machine, then just set up /etc/exports with which directories you want to export and to who, and then set up /etc/fstab on the other machine to automatically mount the shared directory wherever you want.

The end result is a directory on the client machine that acts and functions as though it's native, when it's really a remote mount from the server machine.

Last edited by suicidaleggroll; 08-14-2013 at 05:46 PM.
 
Old 08-14-2013, 05:49 PM   #6
TheOne...More
Member
 
Registered: Jun 2008
Posts: 30

Original Poster
Rep: Reputation: 0
thank you for offering your answer, i would like to know also what if i wanted to expand the network to contain windows. what did i mess up in the steps i explained about samba installation.
 
Old 08-14-2013, 05:54 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
Hard to say. As I mentioned before:
Quote:
In my opinion you should also try to avoid using GUIs for this kind of thing. They rarely set the system up properly, and just end up garbling the config files.
You'll need to dive into the config files (samba, firewall, etc.) to see what the GUI did wrong and fix it.
 
Old 08-14-2013, 06:01 PM   #8
TheOne...More
Member
 
Registered: Jun 2008
Posts: 30

Original Poster
Rep: Reputation: 0
is there an easier way than samba to get windows into the network?
 
Old 08-14-2013, 06:26 PM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
you are going to want to setup NFS server on each of the systems that you have a folder to share across the LAN.

creating /etc/exports for each system to share out the specific path.

on the other systems either use systemd or autofs to mount the shares depending on what vs. of Ubuntu you are running. I have no clue how much of systemd automount is enabled in Ubuntu. I do know you can get autofs up and running with ease in Ubuntu.

The things to google and try:

1. setting up NFS vs 4 server on Ubuntu
2. configure firewall and static ports for NFS vs 4 server in Ubuntu
3. proper configuration for /etc/exports for NFS vs 4 in Ubuntu
4. howto configure autofs for NFS shares Ubuntu.
4a. howto configure automount with systemd in Ubuntu...

Note finding info on systemd automount is going to take a lot more work then autofs. You might want to just use autofs for now as it just works and is very simple to configure.

Once you read up on those steps and start putting things together post here if you have issues.

remember to use code flags. here is my NFS server configuration and /etc/exports as well as an autofs from one of my workstations. Granted im no using Ubuntu, but the basics should be close enough.

here is the workstation autofs configuration:

Code:
[root@localhost ~]# cat /etc/auto.master
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc	/etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#	"nosuid" and "nodev" options unless the "suid" and "dev"
#	options are explicitly given.
#
/net	-hosts
#
# Include /etc/auto.master.d/*.autofs
#
+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/home/user/NFS	/etc/auto.NFS	--timeout=600	--ghost
[root@localhost ~]# cat /etc/auto.NFS
Shares	-rw,soft,intr,bg,rsize=8192,wsize=8192	server:/exports/
here is the /etc/exports from my NFS server:

Code:
[user@server ~]$ cat /etc/exports 
#
#	/etc/exports

#	NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)

#	NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
/exports/NFS_TV_Shows *(rw,insecure,no_subtree_check,fsid=3020)
3 things of note in my exports:

1. note the fsid. each export has to have its own unique number. you assign these numbers.
2. note i have both NFSv3 and NFS4 in my exports due to the fact I have Apple Mac OSx in my LAN.
3. note unless you are running OSx in your LAN, there is no need for the insecure option in your exports.

here is my iptables:

Code:
[root@centos ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 25565 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 4545 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5222 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5269 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 111 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 111 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 2049 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 32803 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 32769 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 892 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 892 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 875 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 875 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 662 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 662 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 137 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 137 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 138 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 138 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 139 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 139 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 445 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 32400 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 32400 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 32469 -j ACCEPT
-A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A OUTPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
note the specific ports.

http://www.jnvilo.com/cms/linux/fedo...6-and-redhat-6

again this is specific to CentOS, im sure it will be similar for Ubuntu.
 
Old 08-14-2013, 06:27 PM   #10
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by TheOne...More View Post
is there an easier way than samba to get windows into the network?
SAMBA is for connecting MS to Linux. Samba is easy, do not bother with any GUI tools for configuring either Samba or NFS. they are not that hard to edit by hand and you will both learn more and be able to properly configure your system.
 
Old 08-14-2013, 06:54 PM   #11
TheOne...More
Member
 
Registered: Jun 2008
Posts: 30

Original Poster
Rep: Reputation: 0
thank you guys.
 
Old 08-14-2013, 07:45 PM   #12
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
good luck, and remember to post back with both questions and success stories. when you are successful post so others in your boat can learn from you. its a wonderful thing.
 
  


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
unable to create a any file under my home directory abhay1983 Linux - Server 1 04-01-2012 03:22 AM
Unable to create home directory using pam_mkhomedir.so sheelavantar Linux - Server 15 10-12-2011 01:47 AM
Create a little home network between XP, Ubuntu and a mac aloha14 Linux - Networking 6 02-01-2009 06:57 AM
Unable to share folders with Mac mini and Macbook on a home network with ubuntu 8.04 smcaro Linux - Newbie 4 11-24-2008 10:34 PM
root unable to create directories in /home? cpv204 Solaris / OpenSolaris 6 11-25-2003 11:33 AM

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

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