-9

I have a Samba share on my local network hosted on a CentOS7 machine (32bit so can't use any answers involving EPEL-RELASE REPOS) and want to configure the permissions and let specific users have access. At the moment, I am having a problem where it says 'Permission Denied' to anybody that tries to access.

Please skim through this video link to see which method I used: EXTERNAL LINK: YouTube.com

And for written instructions (easier link with more detail) see here: EXTERNAL LINK: howtoforge.com

Is there a way to configure my /etc/samba/smb.conf file to allow specific users/all users to access. It would also be nice to relate to credential files (example: share1 lets username: user password: pass access, whilst other logins dont' work) I would like users to be able to access it who aren't users on the CentOS machine.

IT'S A USB DRIVE THAT IS MOUNTED THAT I AM TRYING TO SHARE

Any ideas? Thanks - if you need any further information, please just ask. Below you can find my /etc/samba/smb.conf file contents:

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ============================== 
[Shared]
path = /share/path/here
browsable =yes
writable = yes
guest ok = yes
read only = no
ekv_56
  • 57
  • 3
    The information about your setup steps should be in your post, not as links. – Jeff Schaller Jun 13 '20 at 14:53
  • Is SELinux enabled? Anything relevant in audit log /var/log/audit/audit.log? – sebasth Jun 13 '20 at 14:56
  • @sebasth I believe that has bto be installed through EPEL which can't be used on my CentOS 7 machine on a 32 bit system. – ekv_56 Jun 13 '20 at 17:29
  • @sebasth I'll have a look in audit.log but I just want to know if there's a staightforward way to edit that file to add users/credentials. – ekv_56 Jun 13 '20 at 17:32
  • Why on earth is this considered an urgent problem? You think your problem is more important than other people's problems and should be addressed first? – n8te Jun 14 '20 at 00:51
  • 1
    I would say that "URGENT" is appropriate for paid support, but misses the mark on a volunteer-only site. – Jeff Schaller Jun 14 '20 at 00:56
  • @JeffSchaller Thanks for your support then – ekv_56 Jun 14 '20 at 05:46
  • @n8te I have a time limit on when I need this to be completed by me. Thanks for supporting me and helping me through my question anyway then – ekv_56 Jun 14 '20 at 05:47
  • Possibly related https://unix.stackexchange.com/questions/391673/ – sebasth Jun 14 '20 at 09:35
  • You need to provide more (relevant) information. Also "how to configure the system" and "why my setup isn't working" are two different questions. – sebasth Jun 14 '20 at 09:36
  • This forum is not paid, it is run by free volunteers, so no concept of "urgency" - 1 – Rui F Ribeiro Jun 14 '20 at 19:13
  • 2
    For future reference, you will get more success offering a bounty on the question than calling it urgent in the title. – SethMMorton Jun 14 '20 at 22:45
  • Alright - sorry, I'm new to this and also @SethMMorton I haven't got enough reputatoin anymore to offer any because you've all downvotted it. – ekv_56 Jun 15 '20 at 14:22
  • Thanks for your help everyone – ekv_56 Jun 15 '20 at 14:22

1 Answers1

2

You have a standalone server and normally you would need to create Samba users (smbpasswd -a username), so if you haven't done this and no one can connect, it isn't a Samba problem. If you have created Samba users (which also need to be Unix users) and they cannot connect, then it is most likely a permissions problem, your users need full control on the share, which probably means creating a group or using extended ACL's.

  • But I want to access it from CentOS7 and Windows10 - example amount of users:

    windows1 windows2 windows3 windows4 centos1 centos2 centos3 centos4 centos(2)1 centos(2)2 centos(2)3 centos(2)4

    Centos, Windows & Centos(2) are different machines. I just want to allow write access to 'Everyone' or ALL users on the network. Open to everyone, even guests.

    – ekv_56 Jun 15 '20 at 14:20
  • Then do not create any Samba users (remove any Samba users you may have created) and change the ownership on the share directory to '777'. Any user that connects to the share will be mapped to the guest user 'nobody' and, as you have 'guest ok = yes' set on the share, they will be allowed access. – Rowland Penny Jun 15 '20 at 18:39
  • Done and completed. Thanks. Can a Windows Share be found off the network. (Example: PC1 on WiFi1 shares folder1, can PC2 on WiFi2 nextdoor access PC1's share of folder1?) – ekv_56 Jun 17 '20 at 10:29