LinuxQuestions.org
Visit Jeremy's Blog.
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 07-22-2014, 06:25 PM   #1
sudo su
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Rep: Reputation: Disabled
Setting up Samba (simple questions)


OK, so I am new to samba and Linux servers in general.

I'm looking to configure a spare PC as a home server. Primarily, it'll be a file server hosting a rather large (a few hundred GBs) amount of storage. Client computers are running Windows versions ranging from 8.1 to the venerable XP (yes, the latter is being phased out).

Goals:
  • All server functionality is accessible only on my LAN (no services need to be exposed to the internet as a whole)
  • SSH for remote control, again within the LAN only
  • Samba for file sharing with windows boxes on the same network
  • Password protected Samba shares, using accounts and passwords separate from those on the Windows boxes
  • Encrypted/secure shares if possible

Getting the operating system (Ubuntu 14.04 server, unless someone else has a better suggestion) installed should be no problem. Keeping things within the network should be as simple as NOT enabling port forwarding on my access point. I've configured SSH before, so that's out of the way. However, what about the remaining goals? In my previous (relatively informal) testing/research, I had trouble getting the authentication to work. I want anyone connecting to the share to first be prompted for a username/password combination. This should NOT be the same as the usernames on the client computers, which vary significantly across machines and might cause confusion for users. Also, what about encrypted connections? Passwords are sent encrypted or hashed somehow (I think?), but what about actual file content? I've read that Windows has never supported this, but Windows 7 and 8 appear to have settings regarding connection security within sharing settings. I'm confused.

The way I understand it, I will need to modify the /etc/samba/smb.conf file on the server. I know a little about this, but the default files appear to contain lots of text I don't understand. Should I modify this one, or am I better off creating a new one from scratch? What needs to be done to achieve authentication?

Can anyone help?
 
Old 07-22-2014, 09:24 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
The most useful reference I found for Samba is http://www.samba.org/samba/docs/man/Samba3-ByExample/. It provides examples, starting with simple and moving to complex.

You need to create a user/password on your Samba server for each user, then enter those in the smbpasswd file. They can then log in with that username/password. In addition, the directories must be marked as shared in the directory configuration, which is separate from the samba configuration.

Here's a snippet from my smb.conf file, in case it helps. In my case, I allow users to log in with their normal logins/passwords, which I have configured in my Samba server as described above. I do allow guests, as the shares are available only within my own network and not public-facing

Code:
$ cat /etc/samba/smb.conf
# Global parameters

[global]
workgroup = workgroup
security = share
encrypt password = yes
smb passwd file = /etc/samba/smbpasswd
show add printer wizard = No
wins support = no

[sharefiles]
path = /path/to/some/directory
guest ok = yes
read only = no
available = yes
browsable = yes
public = yes
writable = yes


[files]
path = /path/to/some/other/directory
guest ok = yes
read only = no
available = yes
browsable = yes
public = yes
writable = yes
 
Old 07-22-2014, 09:36 PM   #3
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
you might be interested in this video I did for a Linux Lite Samba server.

https://www.youtube.com/watch?v=MgpE...9u9545&index=2

I cover folder permissions and samba accouts, as well as open shares. There is a simple smb.conf included as well, modified from the one provided by default in Linux Lite (which is Ubuntu based by the way).

samba is samba though, so the smb.conf configurations should be the same on other distros.
 
Old 07-24-2014, 08:16 PM   #4
sudo su
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Question

Thanks a bunch for the swift replies.

So here is what has happened since I last posted:
1. I watched the video and looked some at those sample config files. Helped a lot.
2. I finally got smbpasswd to work. (As it turns out, samba-common-bin was not installed. That was an easy fix.)
3. I tried the share on my Windows 7 box and ran into some issues, but I also happened to try it from my Win8.1 system. To my surprise, it worked as intended on the newer machine.

So now the question is why it won't work on the Windows 7 machine. I can see the server and the shared folder. When I go to access the shared folder, it prompts for a username and password, as it should. When I enter the username and password (correct or not, it doesn't matter), it bounces me back with an error message. The message (I am paraphrasing) is something like this:
Code:
***(Insert share name)*** is not accessible. You might not have permission. Please contact your administrator, etc. Multiple connections to the same resource by the same user, using more than one username are not allowed...
What is happening here?
 
  


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
Two simple questions about PDC samba camerabambai Solaris / OpenSolaris 0 10-28-2011 08:18 AM
Samba - simple questions markwaugh Linux - Networking 8 11-03-2004 01:20 PM
Questions about setting up SAMBA lewisdw Linux - Networking 0 08-11-2004 10:43 AM
Samba start up questions...Setting up share files and smb.conf file Xeroku Linux - Newbie 1 04-17-2003 10:10 PM
Simple samba questions gonus Linux - Software 5 02-24-2003 08:21 PM

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

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