This was asked a long time ago on another site. The querent is still there and I've messaged him about this lost story....what he remembers:-
Some generations back a star ship crew is marooned on a planet. They have lost almost all of their technological abilities. They live in a walled city because among the wildlife on the planet there are creatures who have an annual migration and kill everything in sight at that time. The city is divided into officers and crew quarters. The officers have slightly better living conditions and slightly more science available to them.
One of things that has allowed the city to survive is that some few of their members become "beserkers." (the officers have some vague references to something about amino acids, but they haven't a clue as to what that really means)
The plot revolves around a young man who desires to be a beserker but is not. He falls in love with a young woman who is an aspiring history reader. He makes a discovery that the animals which they fear the most cannot find humans if they rub themselves with a foul smelling pepper plant.
He becomes quite rich and is able not only to take the wife which was assigned to him, but to "buy?" the "historian" he loves. The book leaves with a hint that there is another group of humans who hunt with what the reader recognizes as a blow gun, but the people in the story have no clue of what it is.
There's not too much I can add to the above. I would estimate that the book can be NO newer than the very early 2000's, but I would suspect were looking at something more like 1990's or before. Before 1980 is dubious.
Other plot items:
A mother (who is an "officer" and "city governor?") of a main character (might be the Historian, but I'm not sure) tries to run an experiment on her daughter by seeing to it that her daughter eats no "local" food, because the officers wonder if that that is the key element to triggering the "berserker" rage.
Edit: here is the link to the original site ... https://www.sffchronicles.com/threads/41549/
Update! It's looking now (in Chronicles) as though, with using info from both sites, it might well be answered....or almost confirned as Mud/Aurora by DD Storm In this instance if L Serni can post it as an answer below then I'll accept it