[Samba] chmod of smbpasswd file

Michael Tokarev mjt at tls.msk.ru
Wed Jan 10 14:41:01 UTC 2024


10.01.2024 16:54, Rowland Penny via samba пишет:

> I have no idea why it should just start appearing in your logs now, as
> far as I am aware, that piece of code hasn't changed in years, but if

I found out why. We changed samba logging to log to syslog recently,
that's why it started logging to syslog.  Before that, it were logging
all this nonsense to /var/log/samba/log.smbd with no one noticing.  That
was part of the reason to switch to syslog, - to have the central place
for the logs, to be able to see anomalities.

> you are saying that the systemd journal doesn't log that message, then,
> in my opinion, the systemd journal is faulty, what else isn't it
> logging ?

systemd journal is the only one which is *not* faulty, as it keeps the
size of its logs at control, unlike the obsolete syslog which allows
them to grow in an uncontrollable way, with only logrotate cleaning
them up periodically (unlike when they're too large).

> Your problem is that you have your configs on a read-only filesystem,
> this is your choice, so you have to put up with the fall out.

That's exactly the reason to have configs on a read-only file system - to
ensure they're not modified when should not.  Samba is *not* modifying them
de facto (this file has always been 0600), it is just wrong code and entirely
wrong thing to do to begin with, - to change permissions of *config files*.
Absolutely wrong.

/mjt



More information about the samba mailing list