LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-16-2012, 10:00 AM   #1
jlacroix
Member
 
Registered: Nov 2003
Posts: 183

Rep: Reputation: 15
Problem With User Level Samba Sharing


Hello everyone, I'm trying to create a samba share but only have a specific set of users access it. The Linux server is RHEL 6 and the client accessing it is Windows 7 Ultimate. However, I'm not getting very far. I can only access the share if I uncomment "public = yes". The user account I'm logged into in Windows exists in Linux.

In /etc/samba/smb.conf I have:
Code:
[global]
server string = Linux File Server
workgroup = Work
security = share
name resolve order = bcast hosts wins
client lanman auth=yes
wins support = yes
include = /etc/samba/smbshared.conf
In /etc/samba/smbshared I have:
Code:
Shared]
        path = /shared
        read only = yes
        # public = yes
        write list = jlacroix
        create mask = 0777
        valid users = jlacroix
 
Old 04-16-2012, 11:50 AM   #2
Bill Gates 666
Member
 
Registered: Dec 2003
Location: Cambridge
Distribution: Arch
Posts: 68

Rep: Reputation: 22
Quote:
Originally Posted by jlacroix View Post
Hello everyone, I'm trying to create a samba share but only have a specific set of users access it. The Linux server is RHEL 6 and the client accessing it is Windows 7 Ultimate. However, I'm not getting very far. I can only access the share if I uncomment "public = yes". The user account I'm logged into in Windows exists in Linux.

In /etc/samba/smb.conf I have:
Code:
server string = Linux File Server
workgroup = Work
security = share
...
Hi dude,

Ha ha, have spent many hours fiddling with CIFS mounts and Samba sharing...

By the power of Google...
Here's a quick link for how to setup Samba sharing on RHEL 6.

Have you setup your Samba equivalents of Unix users (pseudo Windows users on the RHEL box)?

FYI It's also important to note that newer versions of Samba (on desktop distro's like ARCH, Ubuntu, etc. now use pdbedit to edit and add new ('virtual' Windows users) to a Samba server backend user database. Samba >3.5 I think from memory. It's a much cleaner system IMHO.

Smbclient running on a networked Linux box is an awesome tool for diagnosing Samba connection problems - far more useful than Windows at the client end! Use it all the time myself.

I believe you want:
Code:
security = user
if you want any kind of user access granularity for your shares. Certainly this is what I use to restrict share access (R/W for my user and RO for guests).

My laptops Samba setup is as follows (single share - accessible by my account only):
Code:
#======================= Global Settings =====================================
[global]
   netbios name = xxxxxxxxxxx
   workgroup = xxxxxxxxxxxxxx
   server string = xxxxxxxxxxxxxxxxxxx
   security = user
   encrypt passwords = true
   hosts allow = 192.168.xxx.xxx/255.255.255.0 127.0.0.0/255.0.0.0
   interfaces = eth0 lo
   bind interfaces only = yes
   load printers = no
   printing = bsd
   disable spoolss = yes
   printcap name = /dev/null
   log level = 10
   log file = /var/log/samba/%m.log
   max log size = 1024
   local master = no
   os level = 50
   preferred master = no
   name resolve order = hosts wins bcast
   wins support = no
   wins proxy = no
   dns proxy = no 

#============================ Share Definitions ==============================

[Public]
   comment = Rob's account common home folder
   path = /xxxxxxxxxxx
   public = no
   writable = no
   printable = no
   write list = robert

#include = /etc/samba/smb.conf.external
 
Old 04-16-2012, 12:47 PM   #3
jlacroix
Member
 
Registered: Nov 2003
Posts: 183

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Bill Gates 666 View Post
Hi dude,

Ha ha, have spent many hours fiddling with CIFS mounts and Samba sharing...

By the power of Google...
Here's a quick link for how to setup Samba sharing on RHEL 6.

Have you setup your Samba equivalents of Unix users (pseudo Windows users on the RHEL box)?

FYI It's also important to note that newer versions of Samba (on desktop distro's like ARCH, Ubuntu, etc. now use pdbedit to edit and add new ('virtual' Windows users) to a Samba server backend user database. Samba >3.5 I think from memory. It's a much cleaner system IMHO.

Smbclient running on a networked Linux box is an awesome tool for diagnosing Samba connection problems - far more useful than Windows at the client end! Use it all the time myself.

I believe you want:
Code:
security = user
if you want any kind of user access granularity for your shares. Certainly this is what I use to restrict share access (R/W for my user and RO for guests).

My laptops Samba setup is as follows (single share - accessible by my account only):
Code:
#======================= Global Settings =====================================
[global]
   netbios name = xxxxxxxxxxx
   workgroup = xxxxxxxxxxxxxx
   server string = xxxxxxxxxxxxxxxxxxx
   security = user
   encrypt passwords = true
   hosts allow = 192.168.xxx.xxx/255.255.255.0 127.0.0.0/255.0.0.0
   interfaces = eth0 lo
   bind interfaces only = yes
   load printers = no
   printing = bsd
   disable spoolss = yes
   printcap name = /dev/null
   log level = 10
   log file = /var/log/samba/%m.log
   max log size = 1024
   local master = no
   os level = 50
   preferred master = no
   name resolve order = hosts wins bcast
   wins support = no
   wins proxy = no
   dns proxy = no 

#============================ Share Definitions ==============================

[Public]
   comment = Rob's account common home folder
   path = /xxxxxxxxxxx
   public = no
   writable = no
   printable = no
   write list = robert

#include = /etc/samba/smb.conf.external
Thank you! That information did the trick.
 
Old 04-16-2012, 04:06 PM   #4
Bill Gates 666
Member
 
Registered: Dec 2003
Location: Cambridge
Distribution: Arch
Posts: 68

Rep: Reputation: 22
Smile

Quote:
Originally Posted by jlacroix View Post
Thank you! That information did the trick.
np
 
  


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
Samba error:server not using user level security aceone Red Hat 1 01-08-2011 11:17 AM
Samba sharing problem (user permission problem) beikokutn Linux - Software 4 03-11-2008 05:55 AM
Slow User Level Security in Samba drumltd Linux - Networking 0 01-10-2005 04:23 PM
Samba - Combination of user and share level security? kleptophobiac Linux - Software 0 07-20-2004 02:15 PM
samba PDC - user level access ilumin8d Linux - Networking 0 08-19-2001 03:09 PM


All times are GMT -5. The time now is 03:02 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration