I need to share a file path = /mnt/3c601e33-9c69-4917-ba31-1c973076ce49/Torrent through my local network
I want to start samba service with systemctl start samba.service
but I can’t,
samba returns an error:samba.service: Main process exited, code=exited, status=1/FAILURE
I created conf file under /var/lib/samba
Should I set server role but how?
active directory domain controller or the rpc proxy with
what does it mean?
tree
.
├── bind-dns [error opening dir]
├── private [error opening dir]
└── smb.conf
And smb.conf
content
[global]
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare allow guests = yes
usershare owner only = yes
workgroup = WORKGROUP
create mask = 0664
directory mask = 2755
force create mode = 0644
force directory mode = 2755
[media]
comment = Media share accessible by greg and pcusers
path = /path/to/media
valid users = greg @pcusers
force group = +pcusers
public = no
writable = yes
create mask = 0664
directory mask = 2775
force create mode = 0664
force directory mode = 2775
[public]
comment = Public share where archie has write access
path = /mnt/3c601e33-9c69-4917-ba31-1c973076ce49/Torrent
public = yes
read only = yes
write list = archie
printable = no
[guests]
comment = Allow all users to read/write
path = /path/to/guests
public = yes
only guest = yes
writable = yes
printable = no
journalctl -u samba.service
-- Journal begins at Tue 2020-05-19 21:39:52 +03, ends at Sat 2021-04-24 22:15:23 +03. --
Apr 24 21:31:05 max-20ste6t12n systemd[1]: Starting Samba AD Daemon...
Apr 24 21:31:05 max-20ste6t12n samba[9308]: [2021/04/24 21:31:05.386256, 0] ../../source4/samba/server.c:644(binary_smbd_main)
Apr 24 21:31:05 max-20ste6t12n samba[9308]: samba version 4.14.2 started.
Apr 24 21:31:05 max-20ste6t12n samba[9308]: Copyright Andrew Tridgell and the Samba Team 1992-2021
Apr 24 21:31:05 max-20ste6t12n samba[9308]: [2021/04/24 21:31:05.386401, 0] ../../lib/util/become_daemon.c:147(daemon_status)
Apr 24 21:31:05 max-20ste6t12n samba[9308]: daemon_status: daemon 'samba' : Starting process...
Apr 24 21:31:05 max-20ste6t12n samba[9308]: [2021/04/24 21:31:05.436096, 0] ../../source4/samba/server.c:874(binary_smbd_main)
Apr 24 21:31:05 max-20ste6t12n samba[9308]: At this time the 'samba' binary should only be used for either:
Apr 24 21:31:05 max-20ste6t12n samba[9308]: 'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint servers = remote'
Apr 24 21:31:05 max-20ste6t12n samba[9308]: You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks
Apr 24 21:31:05 max-20ste6t12n samba[9308]: [2021/04/24 21:31:05.436208, 0] ../../lib/util/become_daemon.c:121(exit_daemon)
Apr 24 21:31:05 max-20ste6t12n samba[9308]: exit_daemon: daemon failed to start: Samba detected misconfigured 'server role' and exited. Check logs for details, error code 22
Apr 24 21:31:05 max-20ste6t12n systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 21:31:05 max-20ste6t12n systemd[1]: samba.service: Failed with result 'exit-code'.
Apr 24 21:31:05 max-20ste6t12n systemd[1]: Failed to start Samba AD Daemon.
Apr 24 21:31:29 max-20ste6t12n systemd[1]: Starting Samba AD Daemon...
Apr 24 21:31:29 max-20ste6t12n samba[9336]: [2021/04/24 21:31:29.438490, 0] ../../source4/samba/server.c:644(binary_smbd_main)
Apr 24 21:31:29 max-20ste6t12n samba[9336]: samba version 4.14.2 started.
Apr 24 21:31:29 max-20ste6t12n samba[9336]: Copyright Andrew Tridgell and the Samba Team 1992-2021
Apr 24 21:31:29 max-20ste6t12n samba[9336]: [2021/04/24 21:31:29.438660, 0] ../../lib/util/become_daemon.c:147(daemon_status)
Apr 24 21:31:29 max-20ste6t12n samba[9336]: daemon_status: daemon 'samba' : Starting process...
Apr 24 21:31:29 max-20ste6t12n samba[9336]: [2021/04/24 21:31:29.477974, 0] ../../source4/samba/server.c:874(binary_smbd_main)
Apr 24 21:31:29 max-20ste6t12n samba[9336]: At this time the 'samba' binary should only be used for either:
Apr 24 21:31:29 max-20ste6t12n samba[9336]: 'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint servers = remote'
Apr 24 21:31:29 max-20ste6t12n samba[9336]: You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks
Apr 24 21:31:29 max-20ste6t12n samba[9336]: [2021/04/24 21:31:29.478098, 0] ../../lib/util/become_daemon.c:121(exit_daemon)
Apr 24 21:31:29 max-20ste6t12n samba[9336]: exit_daemon: daemon failed to start: Samba detected misconfigured 'server role' and exited. Check logs for details, error code 22
Apr 24 21:31:29 max-20ste6t12n systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 21:31:29 max-20ste6t12n systemd[1]: samba.service: Failed with result 'exit-code'.
Apr 24 21:31:29 max-20ste6t12n systemd[1]: Failed to start Samba AD Daemon.
Apr 24 21:36:38 max-20ste6t12n systemd[1]: Starting Samba AD Daemon...
Apr 24 21:36:38 max-20ste6t12n samba[10829]: [2021/04/24 21:36:38.686036, 0] ../../source4/samba/server.c:644(binary_smbd_main)
Apr 24 21:36:38 max-20ste6t12n samba[10829]: samba version 4.14.2 started.
Apr 24 21:36:38 max-20ste6t12n samba[10829]: Copyright Andrew Tridgell and the Samba Team 1992-2021
Apr 24 21:36:38 max-20ste6t12n samba[10829]: [2021/04/24 21:36:38.686323, 0] ../../lib/util/become_daemon.c:147(daemon_status)
Apr 24 21:36:38 max-20ste6t12n samba[10829]: daemon_status: daemon 'samba' : Starting process...
Apr 24 21:36:38 max-20ste6t12n samba[10829]: [2021/04/24 21:36:38.724581, 0] ../../source4/samba/server.c:874(binary_smbd_main)
Apr 24 21:36:38 max-20ste6t12n samba[10829]: At this time the 'samba' binary should only be used for either:
Apr 24 21:36:38 max-20ste6t12n samba[10829]: 'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint servers = remote'
Apr 24 21:36:38 max-20ste6t12n samba[10829]: You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks
Apr 24 21:36:38 max-20ste6t12n samba[10829]: [2021/04/24 21:36:38.724718, 0] ../../lib/util/become_daemon.c:121(exit_daemon)
Apr 24 21:36:38 max-20ste6t12n samba[10829]: exit_daemon: daemon failed to start: Samba detected misconfigured 'server role' and exited. Check logs for details, error code 22
Apr 24 21:36:38 max-20ste6t12n systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 21:36:38 max-20ste6t12n systemd[1]: samba.service: Failed with result 'exit-code'.
Apr 24 21:36:38 max-20ste6t12n systemd[1]: Failed to start Samba AD Daemon.
Apr 24 21:39:43 max-20ste6t12n systemd[1]: Starting Samba AD Daemon...
Apr 24 21:39:43 max-20ste6t12n systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 21:39:43 max-20ste6t12n systemd[1]: samba.service: Failed with result 'exit-code'.
Apr 24 21:39:43 max-20ste6t12n systemd[1]: Failed to start Samba AD Daemon.
Apr 24 21:41:36 max-20ste6t12n systemd[1]: Starting Samba AD Daemon...
Apr 24 21:41:36 max-20ste6t12n systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 21:41:36 max-20ste6t12n systemd[1]: samba.service: Failed with result 'exit-code'.
Apr 24 21:41:36 max-20ste6t12n systemd[1]: Failed to start Samba AD Daemon.
Apr 24 22:12:40 max-20ste6t12n systemd[1]: Starting Samba AD Daemon...
Apr 24 22:12:40 max-20ste6t12n systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 22:12:40 max-20ste6t12n systemd[1]: samba.service: Failed with result 'exit-code'.
Apr 24 22:12:40 max-20ste6t12n systemd[1]: Failed to start Samba AD Daemon.
Apr 24 22:12:50 max-20ste6t12n systemd[1]: Starting Samba AD Daemon...
Apr 24 22:12:50 max-20ste6t12n systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 22:12:50 max-20ste6t12n systemd[1]: samba.service: Failed with result 'exit-code'.
Apr 24 22:12:50 max-20ste6t12n systemd[1]: Failed to start Samba AD Daemon.