Opened 3 months ago

Closed 3 months ago

#15474 closed defect (fixed)

Bad log file in samba

Reported by: pierre Owned by: Douglas R. Reno
Priority: normal Milestone: 11.0
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

I have this error when running smbd:

Aug 25 20:12:40 turboli smbd[1573]:   reopen_one_log: Unable to open new log
file '/usr/local/samba/var/log.smbd': No such file or directory

Don't know where /usr/local/var comes from

Change History (7)

comment:1 by Douglas R. Reno, 3 months ago

Hi Pierre,

When you have a chance, could you please send me a copy of your smb.conf file?

If this does turn out to be a configuration problem with the book, I would like to bring this back into 11.0.

I see that your smbd message up there is mentioning /usr/local, which is kinda strange. Was this a systemd or SysV build where this problem was encountered?

comment:2 by Bruce Dubbs, 3 months ago

Is there an issue with logrotate?

comment:3 by Douglas R. Reno, 3 months ago

I'm thinking this could be an issue with /etc/samba/smb.conf.default. If Pierre used that file to base his configuration, I'll take a look at modifying it to make it compliant with our filesystem layout.

comment:4 by Douglas R. Reno, 3 months ago

Milestone: 11.111.0
Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

I'll fix this with a sed since the book's default configuration is incorrect when taking /etc/samba/smb.conf.default into account.

comment:5 by thomas, 3 months ago

looks like there are some sample config files (examples/tridge/smb.conf, examples/dce-dfs/smb.conf, examples/smb.conf.default) where /usr/local/var/... is specified. So it seems that the mentioned /usr/local/var... comes from the examples/smb.conf.default file which is copied over by books instructions as is.

I suggest to add a little sed and create two dirs

install -v -m644    examples/smb.conf.default /etc/samba &&
sed -e "s;log file =.*;log file = /var/log/samba/%m.log;" \
    -e "s;path = /usr/spool/samba;path = /var/spool/samba;" \
    -i /etc/samba/smb.conf.default &&
install -dm0755 /var/log/samba &&
install -dm0750 /var/spool/samba &&
...

With this changes, i got Samba starting (not sure if it works, not tested yet)

There is also

[printers]
   comment = All Printers
   path = /usr/spool/samba
   ...

which might need to be adjusted. All other (partly invalid) paths are in commented options and therefore i think changing them we can leave to the user.

in reply to:  5 comment:6 by Douglas R. Reno, 3 months ago

Replying to thomas:

looks like there are some sample config files (examples/tridge/smb.conf, examples/dce-dfs/smb.conf, examples/smb.conf.default) where /usr/local/var/... is specified. So it seems that the mentioned /usr/local/var... comes from the examples/smb.conf.default file which is copied over by books instructions as is.

I suggest to add a little sed and create two dirs

install -v -m644    examples/smb.conf.default /etc/samba &&
sed -e "s;log file =.*;log file = /var/log/samba/%m.log;" \
    -e "s;path = /usr/spool/samba;path = /var/spool/samba;" \
    -i /etc/samba/smb.conf.default &&
install -dm0755 /var/log/samba &&
install -dm0750 /var/spool/samba &&
...

With this changes, i got Samba starting (not sure if it works, not tested yet)

There is also

[printers]
   comment = All Printers
   path = /usr/spool/samba
   ...

which might need to be adjusted. All other (partly invalid) paths are in commented options and therefore i think changing them we can leave to the user.

Hi Thomas,

/var/spool/samba and /var/log/samba are created by default when running 'make install', so we're good on that front. I will modify that file with the sed within the next few hours.

comment:7 by Douglas R. Reno, 3 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.