login.conf(5)
But really, it's better to do it via your shell.
Of course root is/can be limited. I also think your understanding of sudo is limited...
Sticking to binaries packages is
overwhelmingly recommended on releases. There's no difference between what you get from the default ports build and packages and attempts to "tweak" ports will garner you no help. And people will probably laugh at you when you don't understand why something is broken.
TL;DR: We do all the hard work for you for a reason. Hard work is
hard and the vast majority of people don't understand it sufficiently.