Solved cron is broken afther upgrade 12.2 to 13.0

Hi
I have to migrate Freebsd-12.2 to 13.0, I'm using only pkg
The migrations ok, only cron appears broken, (no run)
I see the change in release notes Userland Configuration Changes:
init(8), service(8), and cron(8) will now adopt user/class environment variables by default (excluding PATH). Notably, environment variables for all cron jobs and rc(8) services can now be set via login.conf(5). 21c1a93c048f, 736a5a6d1dbb, 7466dbd68487

i read, read, read this, and my knowledge not the solution
Sorry for my approximate English
Thanks for your help advanced user of the FreeBSD
 
I haven't upgraded yet - is it possible to try using the full path to the executable and write simple print statements to the logs (via logger)? You can also capture the env and pipe that to syslog too (env | logger -i -t "TEST"). The tag, TEST, can be whatever you like, then in /var/log/messages (or wherever you have your syslogs set to go), you should see TEST: each env line.
 
I haven't upgraded yet - is it possible to try using the full path to the executable and write simple print statements to the logs (via logger)? You can also capture the env and pipe that to syslog too (env | logger -i -t "TEST"). The tag, TEST, can be whatever you like, then in /var/log/messages (or wherever you have your syslogs set to go), you should see TEST: each env line.
Thanks, sir
I try tomorrow, to day is holiday "family" ;)
 
Hello!
After testing the modification of the login.conf files and reading:

rc.subr (8) now honors $ {name} _env in all rc (8) scripts. Previously, environment variables set by a user via $ {name} _env were ignored if the service defined a custom * _cmd variable to control the behavior of the run_rc_command function, for example, start_cmd, instead of relying on variables like command and command_args. d15e810db9a5

init (8), service (8), and cron (8) will now adopt user / class environment variables by default (excluding PATH). Notably, environment variables for all cron jobs and rc (8) services can now be set via login.conf (5). 21c1a93c048f, 736a5a6d1dbb, 7466dbd68487
in the https://www.freebsd.org/releases/13.0R/relnotes/

The cron system and user is still out
The logs on boot and in var log indicate:
/usr/sbin/cron[1429]: login_getclass: unknown class 'daemon'
I can't seem to redefine the environment variables.
If there is more explicit information, please direct me
Sorry for my terrible English
Thanks to all of you FreeBSD team
 
Hi
Someone could point me to understanding the new rules in use for cron, login.conf and class_login.
Am I too stupid or the only one having this problem with syslog?
Code:
Apr 19 13:35:00 blue /usr/sbin/cron[2300]: (root) CMD (/usr/libexec/atrun)
Apr 19 13:35:00 blue cron[2300]: login_getclass: unknown class 'daemon'
Apr 19 13:35:00 blue kernel: Apr 19 13:35:00 blue cron[2300]: login_getclass: unknown class 'daemon'
Everything worked perfectly with FreeBSD12.2
Thanks
 
Verify /etc/login.conf, it sounds like it got corrupted or at least not merged correctly.
 
Verify /etc/login.conf, it sounds like it got corrupted or at least not merged correctly.
Thank you, Sir
I checked and noticed some changes:
Code:
>>>>>>> 13.0-RELEASE
standard:\
        :tc=default:
xuser:\
        :tc=default:
staff:\
        :tc=default:
# This PATH may be clobbered by individual applications.  Notably, by default,
# rc(8), service(8), and cron(8) will all override it with a default PATH that
# may not include /usr/local/sbin and /usr/local/bin when starting services or
# jobs.
daemon:\
        path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin:\
        :mail@:\
        :memorylocked=128M:\
        :tc=default:
news:\
        :tc=default:
dialer:\
        :tc=default:
If the file is corrupt in upgrade, how to copy in good version?
 
Look closely at the rest of the file. It probably looks something like this:
Code:
<<<<<<< old version
some text
=======
some other text
>>>>>>>> 13.0-RELEASE
Remove the bit between the '<<<<<' and '======' markers. That's the old settings in that file. Perhaps there's something there you changed once, so make sure to make a note of those. Then look at the bit between '======' and '>>>>>>', that's going to be the new version. When you're happy with the changes make sure those marker lines ('<<<<<', '======' and '>>>>>>') are removed too.

For reference, this is a "clean" login.conf for 13.0-RELEASE: https://termbin.com/b3z4a

After you changed that file make sure to run cap_mkdb /etc/login.conf
 
Look closely at the rest of the file. It probably looks something like this:
Code:
<<<<<<< old version
some text
=======
some other text
>>>>>>>> 13.0-RELEASE
Remove the bit between the '<<<<<' and '======' markers. That's the old settings in that file. Perhaps there's something there you changed once, so make sure to make a note of those. Then look at the bit between '======' and '>>>>>>', that's going to be the new version. When you're happy with the changes make sure those marker lines ('<<<<<', '======' and '>>>>>>') are removed too.

For reference, this is a "clean" login.conf for 13.0-RELEASE: https://termbin.com/b3z4a

After you changed that file make sure to run cap_mkdb /etc/login.conf
Ok, sir I make changed and reboot for try
Thanks
 
Look closely at the rest of the file. It probably looks something like this:
Code:
<<<<<<< old version
some text
=======
some other text
>>>>>>>> 13.0-RELEASE
Remove the bit between the '<<<<<' and '======' markers. That's the old settings in that file. Perhaps there's something there you changed once, so make sure to make a note of those. Then look at the bit between '======' and '>>>>>>', that's going to be the new version. When you're happy with the changes make sure those marker lines ('<<<<<', '======' and '>>>>>>') are removed too.

For reference, this is a "clean" login.conf for 13.0-RELEASE: https://termbin.com/b3z4a

After you changed that file make sure to run cap_mkdb /etc/login.conf
Ok , sir
After change the login.conf corrupt and run
cap_mkdb /etc/login.conf
Cron is up, thanks
Now i search one solution for message on boot :
syslogd : uknown proirity name """"
syslogd: name does not resolve: bad file descriptor
on upgrade, various file maybe corrupted, i search during 3 days :)
 
Check /etc/syslog.conf and the files under /etc/syslog.d. They might have had the same kind of merge issues.
 
Check /etc/syslog.conf and the files under /etc/syslog.d. They might have had the same kind of merge issues.
Yes, sir this is true, i erase syslog.conf characters orphans, now my system is up and run fine.
FreeBSD forever, thank you very much Sir
 
Back
Top