I
I
imhoil2016-02-09 10:51:17
Samba
imhoil, 2016-02-09 10:51:17

Centos7. What is the difference between starting samba via systemctl start smb and via smbd console?

This does not apply to the essence of the question, so if you are not interested, then you can proceed to reading the next paragraph. In general, it just so happened that I love FreeBSD and my file washer has existed for a couple of years under zfs (zpool) and this OS. But it turned out that I like to redo something and I wanted to set up an access point (hostap) directly on the router. The target is 5ghz, the network card is intel 7260, but there is no firewood for this network card in 10 free. This is all to the fact that ZoL and firewood under 7260 more or less earned only under this axis.
The problem is that initially security = share was enough for me for home use, but in samba 4 this is already deprecated. In the centos 7 repository, samba3 is simply missing. Part of the samba config:

[global]
...
   security = user
   map to guest = Bad Password
   map to guest = Bad User
...
[public]
   comment = Public
   path = /raid/public/
   public = yes
   writable = yes
   printable = no
   guest ok = yes

Permissions on folders in /raid nobody:nobody 777
Permissions on files in /raid nobody:nobody 666
It lets me into the server itself, let's say with the path \\192.168.1.1 when started in both ways. If I run samba via smbd in the console, everything is fine. If I start samba via sytemctl start smb - it asks for a password on the balls, that is, on \\192.168.1.1\public it doesn’t let me just like that.
The config is the same for both launches.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
imhoil, 2016-02-09
@imhoil

I looked before asking the question. Both times from the root.
Rights through find -exec rules for folders 777, for files 666.
The strangest thing is that when you run it through systemctl, when you try to access the ball, samba behaves in such a way that the login is correct and the password is wrong. That is, he does not ask for credentials, but simply does not let him.
I don't know why, but
chcon -R -t samba_share_t /raid/public worked
.

V
Vyacheslav Ovchinnikov, 2016-02-09
@ova777

Look from what user in both cases process starts (ps aux).
And, accordingly, check the rights (and the owner) on the public folder.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question