Aku pingin masang samba ing CentOS. Samba yaiku wujud program sing duwé guna dadhi bagi-pakai karo sistem Windows.

Caraé biasa:

# yum install samba

Nambah pengguna:

# smbpasswd -a jenengmu

Uga pengaturan ana ing /etc/samba/smb.conf.

Jan sangat biasa. Nanging ana masalah, saben-saben mlebu ana masalah:

System error 5 has occurred.
Access is denied.

Iku jare Windows. Uga jaré CentOS:

check_ntlm_password:  Authentication for user [jenengmu] -> [jenengmu] FAILED with error NT_STATUS_NO_SUCH_USER

Ana apa?

Tibaé iki gara-gara SELinux, program sing dadhi polisi ing kéné, iki ngedang-ngedangi kelakuane samba.

Ana loro cara ngatasi iki, yaiku mateni SELinux utawa nambah pengeturan bené kelakuane samba direstui.

Sing kasiji.
Mateni SELinux

Cara smentara, yaiku gawé

# echo 0 >/selinux/enforce

lan kudu ing sysadm_r

# newrole -r sysadm_r

uga caraé balik

# echo 1 >/selinux/enforce

caraé ngecèk isik murup apa ora

# cat /selinux/enforce

Cara permanen, ing berkas pengaturan /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

ganti SELINUX=enforcing dadhi SELINUX=disabled

Cara sing duwur ikum jaréku iku cara kasar. Kaya mateni laler gawé bom nuklir. Ya, laleré mati, uga akèh liyané. Makané ana cara ing ngisor:

Sing kaloro.
Tambah restué SELinux

Caraé, yaiku:

# setsebool -P samba_export_all_rw=1

Muga-muga ana gunaé.

Bingung? Gedhabrus ing ngisor!

Ojo lali, gedhabrus is our right, kopibec!

Tagged with: