Access denied secured samba - windows 10

Support for security such as Firewalls and securing linux
Post Reply
tsinelas30
Posts: 3
Joined: 2017/01/27 03:19:53

Access denied secured samba - windows 10

Post by tsinelas30 » 2017/02/01 01:15:54

Hi CentOS comm,

What is the possible problem on my secured samba share folder?
When I tried to access the folder using created user "user1" I got access denied response.
I know I typed in the correct password.

[root@localhost demo]# useradd user1
[root@localhost demo]# groupadd group1
[root@localhost demo]# usermod -a -G group1 user1
[root@localhost demo]# smbpasswd -a user1
New SMB password:
Retype new SMB password:
Added user user1.
[root@localhost demo]# mkdir /home/secure
[root@localhost demo]# chown -R user1:group1 /home/secure/
[root@localhost demo]# chmod -R 0770 /home/secure/
[root@localhost demo]# chcon -t samba_share_t /home/secure/
[root@localhost demo]# gedit /etc/samba/smb.conf


[Secure]
path = /home/secure
valid users = @smbgrp
browsable = yes
writable = yes
guest ok = no
read only = no

User avatar
TrevorH
Forum Moderator
Posts: 27164
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Access denied secured samba - windows 10

Post by TrevorH » 2017/02/01 01:19:13

Code: Select all

# getsebool -a | grep -i samba
samba_create_home_dirs --> off
samba_domain_controller --> off
samba_enable_home_dirs --> off
samba_export_all_ro --> off
samba_export_all_rw --> off
samba_load_libgfapi --> off
samba_portmapper --> off
samba_run_unconfined --> off
samba_share_fusefs --> off
samba_share_nfs --> off
sanlock_use_samba --> off
tmpreaper_use_samba --> off
use_samba_home_dirs --> off
virt_use_samba --> off
Third one down looks hopeful.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

tsinelas30
Posts: 3
Joined: 2017/01/27 03:19:53

Re: Access denied secured samba - windows 10

Post by tsinelas30 » 2017/02/01 01:27:07

Sorry I dont get it.

Im new in Centos.

User avatar
TrevorH
Forum Moderator
Posts: 27164
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Access denied secured samba - windows 10

Post by TrevorH » 2017/02/01 07:34:10

samba_enable_home_dirs --> off
That's an selinux boolean that you need to change to allow samba to access home directories - so setsebool -P samba_enable_home_dirs 1
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Security Support”