Preloader image
DDD

리눅스

Samba 설치 & 설정

작성자 관리자 (admin)
조회수 6,871
입력일 2023-09-19 06:19:56

yum install samba
smbpasswd -a user1

vi /etc/samba/smb.conf

# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.

[global]
        workgroup = SAMBA
        security = user

        passdb backend = tdbsam

        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw

[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes

[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @printadmin root
        force group = @printadmin
        create mask = 0664
        directory mask = 0775

[Shared Folder]
  comment = First Shared Folder
  path = /share/data
  public = yes
  writable = yes
  write list = user1
  create mask = 0777
  directory mask = 0777

mkdir -p /share/data

chmod -R 777 /share
systemctl start smb
systemctl enable smb