LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-27-2016, 07:48 AM   #1
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Rep: Reputation: Disabled
Fricken Samba.... Need to share R/W a subdirectory under /home/user


I have Win 7, 8 and 10 boxes that I need to connect via samba to a linux box.

On the linux box:
USER:bob (only bob and root accounts on this box)
SHARED DIRECTORY: /home/bob/shareddocs

On the Windows 7 box:
USER: fred (only fred and admin user accounts on this box)

On the Windows 10 box:
USER: jerry (only jerry and admin user accounts on this box)

I have got samba to the point of the windows boxes seeing the server but, I can't get the permissions correct to access the shared directory.


Can someone please share their working Share Definitions?
 
Old 09-27-2016, 09:04 AM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Relevant sections from my /etc/samba/smb.conf
Code:
   unix password sync = no
[...]
[DEED]
path = /home/kuo/deed
writable = no
[TRANSFER]
path = /home/kuo/tempo/transfer
writable = yes
I have two samba shares - one is read only, and one is read-write.

In addition to creating those very simple modifications to smb.conf, I also had to manually add one user to samba users with:
Code:
smbpasswd -a kuo
Note that you can list the samba users with:
Code:
pdbedit -w -L
I did things this way to minimize my effort and headaches. When connecting to the share, the end user must enter the user and password ("kuo" is the user, the password is what I entered and I purposefully do NOT sync it with the *nix password).

If you want to do fancier authentication, you'll have to do fancier configuration.

My recommendation, though, is to create a new linux user and do "smbpasswd -a NEWUSERID" to add it (only) to smb users. Unless you're okay with sharing bob's samba password with everyone (remember that if you do NOT sync the samba passwords with the *nix passwords, they can be different).
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
limiting vsftpd user to subdirectory of home directory sniper8752 Linux - Newbie 6 07-29-2014 07:30 AM
How do I sync /home with a samba share Thblaze Linux - Networking 6 02-20-2012 04:41 AM
how to get different permission to subdirectory of a share in samba golden_boy615 Linux - Newbie 3 12-14-2011 05:26 AM
vsftpd: Can a local user be restricted to a subdirectory in HOME granduke Linux - Server 1 05-01-2008 08:14 AM
Samba :share files from home directory to an other user flashdelux Linux - Software 0 11-29-2004 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:52 AM.

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