2022年10月3日 星期一

LInux samba service on CentOS 7

Reference:
 
安裝:
yum install -y samba

設定:
cp /etc/samba/smb.conf /etc/samba/smb.conf.ori
vi /etc/samba/smb.conf
 
[global]
        workgroup = SAMBA
        security = user
        #passdb backend = tdbsam

        map to guest = bad user
        #printing = cups
        #printcap name = cups
        #load printers = yes
        #cups options = raw

[images]
        comment = public images
        path = /path/to/images
        browseable = Yes
        read only = Yes
        writable = Yes
        guest ok = Yes
        force user = smbuser
 
啟動:
systemctl enable smb.service ; systemctl enable nmb.service
systemctl restart smb.service ; systemctl restart nmb.service
 
設定使用者帳號:
user add smbuser
smbpasswd smbuser
chown -R smbuser /path/to/images

沒有留言:

張貼留言