# newsyslog error after upgrade to 12.0



## drobison (Aug 28, 2019)

Hiya,

Used freebsd-update to move from 11.3 to 12.0 and it mostly went well, but I'm getting this:


```
root@homedistiller:~ # newsyslog
newsyslog: error in config file; unknown user:
.include <src.opts.mk>
```

I notice there is no src.opts.mk in /usr/share/mk, and in fact /usr/src/share/mk has numerous files which are not in /usr/share/mk.

the ntpd user and the _ntpd user both existed in master.passwd and group, probably my mistake during mergemaster. I removed _ntpd.


----------



## olli@ (Aug 28, 2019)

Uhm … Why should the newsyslog(8) configuration include a make(1) file? That doesn't make sense. Also, the include syntax is different (`<include> file` vs. `.include <file>`). I suspect there's an error in your /etc/newsyslog.conf file or one of the files included from the /etc/newsyslog.conf.d directory.


----------



## drobison (Aug 28, 2019)

```
root@homedistiller:/usr/src/usr.sbin/newsyslog # md5 newsyslog.conf
MD5 (newsyslog.conf) = c61c6f5f2bd3bc1db66354a3d669ab96
root@homedistiller:/usr/src/usr.sbin/newsyslog # md5 /etc/newsyslog.conf
MD5 (/etc/newsyslog.conf) = c61c6f5f2bd3bc1db66354a3d669ab96

root@homedistiller:/usr/src/usr.sbin/newsyslog # md5 newsyslog.conf.d/*
MD5 (newsyslog.conf.d/amd.conf) = 2451741b49f6db0cbaf55da4594a56ee
MD5 (newsyslog.conf.d/ftp.conf) = b195cd11aad437b42894954ee417f177
MD5 (newsyslog.conf.d/lpr.conf) = 61450bde3312ef7d08a79a8f1811165a
MD5 (newsyslog.conf.d/Makefile) = 19f5fe7c9650bec3bb97afacb9179aab
MD5 (newsyslog.conf.d/Makefile.depend) = 8c52099a54fa34979d39e760c123a737
MD5 (newsyslog.conf.d/opensm.conf) = fe9b09da517dd70c02a141e6e2b8a4e6
MD5 (newsyslog.conf.d/pf.conf) = e695fee559ff0f194e96f8df06aa1166
MD5 (newsyslog.conf.d/ppp.conf) = 1e93c9a2978ea7d9dd3abbaab356eede
MD5 (newsyslog.conf.d/sendmail.conf) = 9d1b4959bef62e97efdfd0fa8aa809e5
root@homedistiller:/usr/src/usr.sbin/newsyslog # md5 /etc/newsyslog.conf.d/*
MD5 (/etc/newsyslog.conf.d/amd.conf) = 2451741b49f6db0cbaf55da4594a56ee
MD5 (/etc/newsyslog.conf.d/ftp.conf) = b195cd11aad437b42894954ee417f177
MD5 (/etc/newsyslog.conf.d/lpr.conf) = 61450bde3312ef7d08a79a8f1811165a
MD5 (/etc/newsyslog.conf.d/Makefile) = 19f5fe7c9650bec3bb97afacb9179aab
MD5 (/etc/newsyslog.conf.d/Makefile.depend) = 8c52099a54fa34979d39e760c123a737
MD5 (/etc/newsyslog.conf.d/opensm.conf) = fe9b09da517dd70c02a141e6e2b8a4e6
MD5 (/etc/newsyslog.conf.d/pf.conf) = e695fee559ff0f194e96f8df06aa1166
MD5 (/etc/newsyslog.conf.d/ppp.conf) = 1e93c9a2978ea7d9dd3abbaab356eede
MD5 (/etc/newsyslog.conf.d/sendmail.conf) = 9d1b4959bef62e97efdfd0fa8aa809e5
root@homedistiller:/usr/src/usr.sbin/newsyslog #
```


----------



## olli@ (Aug 28, 2019)

drobison said:


> ```
> ...
> MD5 (/etc/newsyslog.conf.d/Makefile) = 19f5fe7c9650bec3bb97afacb9179aab
> MD5 (/etc/newsyslog.conf.d/Makefile.depend) = 8c52099a54fa34979d39e760c123a737
> ```


That's the problem. Those files don't belong there.


----------



## drobison (Aug 28, 2019)

Yep. Not sure how they got there. I believe this is fixed!


----------



## drobison (Aug 28, 2019)

Incidentally this happened on two separate servers. Probably something inept I did during freebsd-update install, but just FYI.


----------



## Barney (Nov 6, 2019)

What's the point of this new nonsense? The entire point of newsyslog.conf was that it was one simple flat file. Now someone has a bright idea to make it more complicated and more geeky. It never ends.

Im glad I found this thread so I can rip these directories out of my systems.


----------



## SirDice (Nov 6, 2019)

Barney said:


> What's the point of this new nonsense?


You're barking up the wrong tree. There's nothing new here.


----------



## Barney (Nov 6, 2019)

SirDice said:


> You're barking up the wrong tree. There's nothing new here.


New is relative. When did they add the config directory?


----------



## SirDice (Nov 6, 2019)

If I recall correctly 11.0.


----------



## Barney (Nov 6, 2019)

I've been on a linux project bender for 2 years so Im a bit behind. While I'm on it, is there a switch to just check the config file for sanity like apachectl -t ?


----------



## SirDice (Nov 6, 2019)

A combination of these?

```
-v	     Place newsyslog in	verbose	mode.  In this mode it will print out
	     each log and its reasons for either trimming that log or skipping
	     it.

     -n	     Cause newsyslog not to trim the logs, but to print	out what it
	     would do if this option were not specified.  This option implies
	     the -r option.

     -r	     Remove the	restriction that newsyslog must	be running as root.
	     Of	course,	newsyslog will not be able to send a HUP signal	to
	     syslogd(8)	so this	option should only be used in debugging.
```


----------



## Barney (Nov 6, 2019)

Care to help me decode this output:


```
/etc/newsyslog.conf <3>: size (Kb): 4 [50] --> skipping
```


----------



## SirDice (Nov 6, 2019)

SirDice said:


> If I recall correctly 11.0.


Browsing through the various versions, it was actually 10.1 that first got it.


----------



## SirDice (Nov 6, 2019)

Barney said:


> Care to help me decode this output:


count = 3; split by size; currently 4KB and can grow to 50KB; no need to rotate


----------



## Barney (Nov 6, 2019)

Not sure what it's counting. It's not very good at finding errors. Invalid files, counts of 0, invalid permissions all go unnoticed. Better than nothing I suppose.


----------



## SirDice (Nov 6, 2019)

Barney said:


> Not sure what it's counting


The count indicates how many archived files should be kept. 


```
count   Specify the maximum number of archive files which may exist.
             This does not consider the current log file.
```
newsyslog.conf(5)


----------

