LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem With User Level Samba Sharing (https://www.linuxquestions.org/questions/linux-networking-3/problem-with-user-level-samba-sharing-940056/)

jlacroix 04-16-2012 10:00 AM

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


Bill Gates 666 04-16-2012 11:50 AM

Quote:

Originally Posted by jlacroix (Post 4654160)
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


jlacroix 04-16-2012 12:47 PM

Quote:

Originally Posted by Bill Gates 666 (Post 4654237)
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. :)

Bill Gates 666 04-16-2012 04:06 PM

Quote:

Originally Posted by jlacroix (Post 4654278)
Thank you! That information did the trick. :)

np :hattip:


All times are GMT -5. The time now is 01:39 PM.