tdbsam 백엔드가 있는 Debian 4.0(Etch) Samba 독립 실행형 서버

tdbsam 백엔드가 있는 Debian 4.0(Etch) Samba 독립 실행형 서버

2022-10-20 last update

6 minutes reading storage debian samba
이 튜토리얼에서는 Debian Etch에 Samba 파일 서버를 설치하고 SMB 프로토콜을 통해 파일을 공유하고 사용자를 추가하도록 구성하는 방법을 설명합니다. Samba는 도메인 컨트롤러가 아닌 독립 실행형 서버로 구성됩니다. Samba를 도메인 컨트롤러로 구성하려면 이 방법을 살펴보십시오: #!/samba_domaincontroller_setup_ubuntu_6.10

결과 설정에서 모든 사용자는 SMB 프로토콜을 통해 액세스할 수 있는 자체 홈 디렉토리를 가지며 모든 사용자는 읽기/쓰기 액세스 권한이 있는 공유 디렉토리를 갖습니다.

삼바 설치


데비안 삼바 패키지를 설치합니다:
apt-get install libcupsys2 samba samba-common
다음 질문에 답하십시오.
Please specify the workgroup you want this server to appear to be in when queried by clients. Note that this parameter also controls the domain name used with the security=domain setting.
Workgroup/Domain Name:
-> 작업 그룹
If your computer gets IP address information from a DHCP server on the network, the DHCP server may also provide information about WINS servers ("NetBIOS name â servers") present on the network. This requires a change to your smb.conf file so that DHCP-provided WINS settings will automatically be read from /etc/samba/dhcp.conf.
The dhcp3-client package must be installed to take advantage of this feature.
Modify smb.conf to use WINS settings from DHCP?
-> 아니
smb.conf 파일을 편집합니다.
vi /etc/samba/smb.conf
전역 섹션에서 ";"security = user 줄의 맨 앞에 있으므로 다음과 같이 표시됩니다.
security = user
Linux 시스템 사용자가 Samba 서버에 로그인할 수 있도록 합니다.
[homes] 섹션에서 writable = no를 다음으로 변경합니다.
writable = yes
파일을 닫고 Samba를 다시 시작합니다.
/etc/init.d/samba restart
이제 모든 사용자가 액세스할 수 있는 공유를 추가하겠습니다.
파일을 공유할 디렉토리를 만들고 소유자를 사용자 그룹으로 변경합니다.
mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/
/etc/samba/smb.conf 파일 끝에 다음 줄을 추가합니다.
[allusers]
  comment = All Users
  path = /home/shares/allusers
  valid users = @users
  force group = users 
  create mask = 0660
  directory mask = 0771
  writable = yes
이제 Samba를 다시 시작합니다.
/etc/init.d/samba restart

사용자 추가 및 관리


이 예에서는 tom이라는 사용자를 추가합니다. 같은 방식으로 필요한 만큼 사용자를 추가할 수 있습니다. 명령에서 사용자 이름을 원하는 사용자 이름으로 바꾸면 됩니다.
useradd tom -m -G users
이제 사용자를 Samba 사용자 데이터베이스에 추가합니다.
smbpasswd -a tom
-> 새 사용자의 비밀번호를 입력합니다.
이제 사용자 이름 tom과 선택한 비밀번호를 사용하여 파일 탐색기를 사용하여 Windows 워크스테이션에서 로그인할 수 있어야 하며 Linux 서버의 tom 홈 디렉토리나 공용 공유 디렉토리에 파일을 저장할 수 있습니다.

연결


  • http://www.debian.org
  • http://www.samba.org