Setting up home network

Discussion in 'General Linux' started by URDRWHO, Mar 4, 2014.

  1. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    I've never had a problem setting up file sharing with my Win7 and XP laptop. Linux and Win7 are a different matter and Samba has me scratching my head.

    I've marked several folders to share
    I've created static IP address on the Win7 and Linux boxes
    Not a thing is happening.

    I've searched on the internet for a nice small samba config file but all I find things like PDF files that are 1,000 pages long. This should be easy, why am I having a problem.

    All I need to do is share a folder named sharefolder located on the Linux laptop.
    I don't want to become a network expert, all I want is a small home file sharing situation.

    Does the Samba config need the same name as the Win7 work group --- which on my desktop it is WORK NETWORK. If so do I change it under global?


    Oh well maybe someone can give me direction toward fixing this problem.
    DevynCJohnson likes this.
  2. atanere

    atanere New Member

    Messages:
    28
    Likes Received:
    17
    Trophy Points:
    3
    Sometimes a space character is a problem, such as WORK NETWORK. But I don't know if that is your issue or not. I assume you have turned off "Windows Home Network" in Win7... that is also a problem for Linux. Here are a couple of links below that help get networking running with Ubuntu/Windows, and maybe other distros too. They are somewhat old, but I think they are still relevant:

    http://www.europe.eclipse.co.uk/Ubuntu/1010 on Win Network.htm

    http://www.liberiangeek.net/2012/06...able-public-folder-sharing-without-passwords/
  3. arochester

    arochester Well-Known Member

    Messages:
    853
    Likes Received:
    273
    Trophy Points:
    63
  4. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    I don't use home network and yes it is turned off.
  5. Yesyesloud

    Yesyesloud Active Member

    Messages:
    259
    Likes Received:
    128
    Trophy Points:
    43
    A question. Can your machines ping each other? On the command line, type, for instance:

    Code:
    ping 192.168.0.1
    Replace that ip number with the machine's you intend to ping, obviously.

    If mutual communication succeeds through TCP/IP and you could actually set up the samba server on the Linux side, try accessing it on a windows pc by typing something like this in "explorer" location bar (replace the ip number with the actual target):

    \\192.168.0.1

    If everything works fine, shared folders will show up once you log on.

    Windows explorer doesn't always show samba shares automatically, but you can create shortcuts after reaching the paths on your own.

    ___

    In case you weren't able to actually set samba up and dancing...

    Configuring it manually is almost as easy as using a GUI.

    Let's assume you know the network basics, as it appears. Then, when you edit smb.conf (usually /etc/samba/smb.conf), all the necessary information is #commented above each setting section.

    If you still have trouble with that, a quick manual.

    Don't forget to limit hosts allow under global settings, if you want to turn the share local-only, apart from your firewall enforcement.
    DevynCJohnson likes this.
  6. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    I can ping ok from the linux laptop to the static address on the desktop, packets sent / received and zero loss. The same for Win desktop to Linux laptop.

    Where failure happens is when I put the TCP IPv4 in the browser. I get an error message "can't find the server at (insert my static desktop address).

    So when the desktop gets the Samba Server in its network, I can go to the Linux shared files, copy a file from the Linux box and copy it to Win7. I can not copy and paste anything from Win7 into the Samba Server shared files.

    Linux shows no Win7 files, none at all.

    I have both computers using the same work-group names.

    When testing I turned off Avast my anti virus program. Win7 has no Win firewall enabled.

    Looking at the router and there is nothing in there to block me. Hm? I did see something and I do need to talk to my son about the security of his Port Forwarding of his Minecraft server but that is another issue.

    When I boot to XP on the laptop, I can share files from both computers on the share file folders. So because it works with theWin7/XP arrangement it seems to me to be a Linux issue.

    I'll try the base smb set up in the quick manual.

    This config file is the one that allows Win7 to see and copy files ----- I remove the host allow which is the static address of the Win7 computer.

    [global]
    workgroup = JOHNS LINUX
    server string = My Linux File Server
    # changed address
    hosts allow =
    log file = /var/log/samba/%m.log
    security = user
    netbios name = SAMBA SERVER
    encrypt passwords = yes
    smb passwd file = /etc/samba/smbpasswd
    domain master = yes
    local master = yes
    preferred master = yes
    #changed to 33 was 65
    os level = 33
    wins support = yes
    #just added
    guest ok = yes
    writable = yes
    browsable = yes
    #continue
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

    [sharedfolder]
    path = /home/john/sharedfolder
    available = yes
    public = yes
    #valid users = john
    read only = no
    browsable = yes
    public = yes
    writable = yes

    [printers]
    #path = /var/spool/samba
    #public = yes
    #guest ok = yes
    #printable = yes
    #browseable = yes
    #writable = yes
    #read only = no



    Last edited: Mar 5, 2014
  7. Yesyesloud

    Yesyesloud Active Member

    Messages:
    259
    Likes Received:
    128
    Trophy Points:
    43
    Ok, I guess you have solved this issue.

    Let's get to the next problem.

    According to your config file, you should be able to write data into that folder.

    Are you accessing it as guest/anonymous, or are you logging into it? I am not sure if you'll have write permissions as guest.

    On my home share, the configuration is basically the same as yours, but I leave valid users on (remove that # in front of it on your smb.conf).

    Setting samba login with your system user:
    Code:
    sudo smbpasswd -L -a USERNAME
    Or you could follow smb.conf suggestion for a read/write public share, since you have protected it with hosts allow setting:


    # A publicly accessible directory, read/write to all users. Note that all files
    # created in the directory by users will be owned by the default user, so
    # any user with access can delete any other user's files. Obviously this
    # directory must be writable by the default user. Another user could of course
    # be specified, in which case all files would be owned by that user instead.
    ;[public]
    ; path = /usr/somewhere/else/public
    ; public = yes
    ; only guest = yes
    ; writable = yes



    Although many distributions do it out of the box, Linux doesn't really have to show windows files. Most distros repositories offer software that will smooth this process anyway.

    What is your file manager (Thunar, Nautilus, etc.)? I could only access Windows shares on GNU/Linux after installing extensions for my file browsers. I could tell you which package may do the trick.
    Last edited: Mar 5, 2014
  8. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    I am not a guest but have to sign in on the Win7 machine using the Linux password that I had set.

    I am using Kubuntu and that comes with Dolphin file manager.

    My son mentioned something about NTFS tools and I found something on the Package Manager --- ntfs-config.

    My son the 20 year old computer guy isn't in to helping much because he doesn't like network stuff. Therefore he probably didn't listen much in class when they were going over networks.

    I don't know why I would need another package to read NTFS files. I can read them now in Linux. I can use the file manager to look at the files on the XP partition and manage those files (copy/paste, etc).

    Something I've always done when changing file sharing controls is re-booting all computers. Must I do it or just re-boot the computer that has the changed settings?

    I am really happy with the life that this linux has given back to my very old HP Pavillion Zv5000. If only I didn't have company specific software that is Windows addicted I would use Linux as my workhorse. On my desktop (my office workhorse) I have a very expensive Contact Manager and have no idea if it could work with Wine. I would love to use Kubuntu on that desktop. But another issue, the real issue at the moment is this network problem. :)

  9. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    Ok I think I have found one problem.

    Under Permissions

    1. Owner - can modify contents
    2. Groups - can modify contents
    3. Others can modify contents
    4. User is John
    5. Group is John (drop down allows this to be other things even Samba Share)
    Share
    1. When I change the permissions to share, the globe is shown on the folder.
    2. I placed a check mark on Share with (Microsoft Windows).
    3. Name of the folder is Public.
    4. Check mark allow guests
    5. Everyone - full control
    6. John Full control
    7. Click OK
    Ok I look at the file tree and see the Public folder has the globe
    I go back into Properties for Public Folder go to share and see that it is set to read only
    I've tried several times but it will always revert back to read only

    Last night my son did something in the terminal (Sudo Dolphin I think) and it gave me sudo rights. Not sure if it is the correct language. Anyhow --- we changed the Property/Permissions/Share/ last night with the higher rights but apparently it always goes back.

    In my etc/sudoers.d file it is empty. No super users? I thought that since I originally set this up I would have admin / superuser rights? Do I need such rights to make share changes? I do not know???????
  10. Yesyesloud

    Yesyesloud Active Member

    Messages:
    259
    Likes Received:
    128
    Trophy Points:
    43
    You're right, there's no need for a package to read NTFS, all modern distributions may be able read this file system.

    What you need is one or more packages integrating Dolphin with your average Windows network. Most KDE distributions may have them installed by default, according to their core philosophy (being windows user-friendly).

    I use gnome, so gvfs, gvfs-smb and sshfs do the trick for me, making Windows shares visible on both Nautilus and Thunar via smb:// protocol.

    Maybe you could try smb4k, it's specifically built for KDE. It accesses samba shares/windows shares, from my experience. Look for it on Kubuntu software center.

    Or you could try to access smb://windows.pc.ip.adress on Dolphin, which might work out of the box. If it doesn't, then you must install some extra package(s). That's what I meant on my last post.

    If you want to apply new smb.conf (Samba) settings, just type the following command on a terminal:

    Code:
    sudo service smbd restart
    Linux is known for its, say, long term sessions. Some servers have run a couple of years without rebooting. You can configure about everything without restarting.

    Try to avoid using sudo for GUIs. In order to run a KDE GUI like Dolphin as root, you may want to enter the following command:
    Code:
    kdesu dolphin
    Anyway, since you're running samba server, unless it's perfectly integrated with Dolphin, you are only able to set read/write permissions through smb.conf. Or by using a configuration GUI that writes changes to such file.
    Last edited: Mar 5, 2014
  11. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    I've been using this (sudo service smbd restart) I just wasn't sure if the network needed to clean itself out on a reboot.
    Thanks

    I'll check out the other stuff later this evening.

    I think I messed up and my home/documents is now owned by root. Not sure but I think maybe. I still don't know why my share choice changes.

  12. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    I have no idea why the laptop / win7 desktop won't share well and I think I'm giving up.

    I was just in my son's room where he has an old HP - XP desktop sharing with his Win8 desktop. His desktop has no name because he built it.

    I went and looked at the Linux SMB.conf file on the HP and it is the stock one that was entered when Samba was installed. The only difference is that he is running Ubuntu with KDE workplace and I am running Kubuntu.

    It makes no sense and I can understand his distaste for networking. :)

    Ok....an update

    I have some sharing working between the two computers. The Win7 box can write to a shared linux shared folder.

    Oh and I wrote over the default installed Samba conf file and used the one I noted in one of my earlier posts.

    What did I change?

    Using the system samba config service (something I used before) I went into it and instead of telling it to share with everyone, I told it to share with only one person, john. Went into the home/john/sharedfolder and chose the needed share properties. Went to the sub-folder in sharedfolder and chose share options.

    Saved everything, rebooted both computers.

    After rebooting, the Win7 showed the Samba Server, I chose the server, I put in my user name / password and went to the folders. I copied something from Win7 to the Linux folder and --- it worked.

    Networks.....they are such persnickety things.
    Last edited: Mar 6, 2014
    Yesyesloud likes this.
  13. Yesyesloud

    Yesyesloud Active Member

    Messages:
    259
    Likes Received:
    128
    Trophy Points:
    43
    On the default smb.conf, you sometimes lose track of some settings overlapping a humble folder share configuration. Keeping it smaller helps.

    As to rebooting, well, no harm in doing that. Samba is simple, restarting it should have got the job done, as well as restarting the network daemon, perhaps. I'm not aware of other things that would need reloading in this case. So... Just rebooting is simpler :D

    Kubuntu is a different distribution than Ubuntu with KDE, but there shouldn't be major differences, specially regarding GUI-independent daemons (and if they're exactly the same on both distros). Tricky stuff, regardless.

    I only share over home networks with user and host restrictions, you're good, that's the safest way to go.

    I'm glad you solved that issue, servers can be nasty.
  14. URDRWHO

    URDRWHO Member

    Messages:
    94
    Likes Received:
    6
    Trophy Points:
    8
    Just hoping that the sync doesn't break because I'm not 100% sure why or how I got it working. Keeping my fingers crossed.

Share This Page