I've been trying to make my own sudo program in Python, but I don't want to have any dependencies (like su or pkexec). How would I gain root access? Ideas:
How would I do any of these or is there a different way? Or is Python even low level enough to do this?
If it's not a project and the goal is only to not have sudo dependencies while having root access, there are some sudo alternatives. Use at your own risk, I have no experience with these. Also, I don't see pkexec or su being dependencies on the Arch or Ubuntu packages sites, but on Arch you can always force remove packages without removing any dependencies by using sudo pacman -Rdd package_name.