Samba on Fedora 20


Configuration examples
Adding users to samba
Persistent Changes: semanage fcontext

SELinux: samba

$ sudo yum install samba samba-common samba-client cups-lib system-config-samba
$ system-config-samba (=> Samba Configuration GUI)

$ setsebool -P samba_enable_home_dirs 1

$ smbpasswd -a andreas
No builtin backend found, trying to load plugin
Module 'tdbsam' loaded
New SMB password:
Retype new SMB password:
Added user andreas.

$ firewall-config

$ systemctl enable smb.service 
ln -s '/usr/lib/systemd/system/smb.service' '/etc/systemd/system/multi-user.target.wants/smb.service'
$ sudo systemctl enable nmb.service
ln -s '/usr/lib/systemd/system/nmb.service' '/etc/systemd/system/multi-user.target.wants/nmb.service'
# Global parameters
[global]
        workgroup = BSD-ADVAOPTICAL
        debug level = 2

[homes]
	comment = Home Directories
	browseable = no
	valid users = %S
	writeable = yes
	create mode = 0600
	directory mode = 0700
# smbstatus

Samba version 4.1.16
PID     Username      Group         Machine
-------------------------------------------------------------------
5959      bachi         bachi         172.21.99.51 (ipv4:172.21.99.51:58344)
5753      bachi         bachi         172.21.99.51 (ipv4:172.21.99.51:55987)

Service      pid     machine       Connected at
-------------------------------------------------------
bachi        5959   172.21.99.51  Fri Nov 20 13:07:51 2015
bachi        5753   172.21.99.51  Fri Nov 20 11:47:39 2015
IPC$         5959   172.21.99.51  Fri Nov 20 14:19:04 2015

Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
5959         1001       DENY_NONE  0x100081    RDONLY     NONE             /usr/home/bachi   pcap   Fri Nov 20 14:19:11 2015
5959         1001       DENY_ALL   0x100080    RDONLY     NONE             /usr/home/bachi   .   Fri Nov 20 13:07:52 2015
5753         1001       DENY_ALL   0x100080    RDONLY     NONE             /usr/home/bachi   .   Fri Nov 20 11:47:39 2015
5959         1001       DENY_NONE  0x100081    RDONLY     NONE             /usr/home/bachi   .   Fri Nov 20 14:19:04 2015
5959         1001       DENY_NONE  0x120089    RDONLY     BATCH            /usr/home/bachi   R&D Hardware (T) - Shortcut.lnk   Fri Nov 20 14:19:04 2015

Leave a Reply

Your email address will not be published. Required fields are marked *