나는 이것을 달성하려고 노력해 왔습니다.
- 다음 삼바 구성 파일을 사용하십시오.
.config/smb.conf
그리고
- 아래의 서비스 구성 파일
.config/systemd/user/smbd.service
그리고
- 달리기
systemctl --user start smbd.service
그러나 상태가 실패하고 systemctl --user status smbd.service
or에서 얻는 것은 다음과 같습니다 journalctl --user --e
.
May 22 15:26:48 localhost.localdomain smbd[19674]: [2021/05/22 15:26:48.756294, 0] ../../lib/util/debug.c:1098(reopen_one_log)
May 22 15:26:48 localhost.localdomain smbd[19674]: reopen_one_log: Unable to open new log file '/var/log/samba/log.smbd': Permission denied
May 22 15:26:48 localhost.localdomain smbd[19674]: [2021/05/22 15:26:48.756339, 0] ../../source3/smbd/server.c:1775(main)
May 22 15:26:48 localhost.localdomain smbd[19674]: smbd version 4.11.6-Ubuntu started.
May 22 15:26:48 localhost.localdomain smbd[19674]: Copyright Andrew Tridgell and the Samba Team 1992-2019
May 22 15:26:48 localhost.localdomain systemd[1582]: smbd.service: Main process exited, code=exited, status=1/FAILURE
May 22 15:26:48 localhost.localdomain systemd[1582]: smbd.service: Failed with result 'exit-code'.
May 22 15:26:48 localhost.localdomain systemd[1582]: smbd.service: Scheduled restart job, restart counter is at 5.
May 22 15:26:48 localhost.localdomain systemd[1582]: Stopped Samba SMB Daemon.
May 22 15:26:48 localhost.localdomain systemd[1582]: smbd.service: Start request repeated too quickly.
May 22 15:26:48 localhost.localdomain systemd[1582]: smbd.service: Failed with result 'exit-code'.
May 22 15:26:48 localhost.localdomain systemd[1582]: Failed to start Samba SMB Daemon.
나는 이 줄을 알고 있지만 May 22 15:26:48 localhost.localdomain smbd[19674]: reopen_one_log: Unable to open new log file '/var/log/samba/log.smbd': Permission denied
삼바 구성 파일에 $HOME/logs/samba/log.%m
.
완전성을 위해 구성 파일을 붙여넣습니다.
[global]
workgroup = sm
client min protocol = NT1
server string = %h server (Samba, Ubuntu)
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
log file = $HOME/logs/samba/log.%m
max log size = 1000
logging = file
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[sambashare]
comment = Samba on Ubuntu
path = /home/sm/samba
read only = no
browsable = yes
directory mask = 0755
필요한 경우 서비스 단위의 사용자 프로필을 추가할 수 있습니다. 어떤 아이디어가 있나요?