On debian you usually log in as root — with Ubuntu I do:
sudo su
I believe the su user is not active by default (as it is active by default on other distros like FreeBSD and CentOS). You could always make the su account active if you need to but I think sudo su will likely suffice.
“sudo” is a nice feature in linux systems like debian to execute command with other users.
The problem is the ubuntu strategy to move the not-security-features from windows (work as administrator) to ubuntu (“sudo whoami” or whatever unsecure command execute as root)
You can install “sudo” on Debian and use it normal. The problem is the mad /etc/sudoers from ubuntu … all %admins can do everysting. But in Debian it is not standard. Read /etc/sudoers on Debian and Ubuntu.
All nextcloud documentation with “sudo -u www-data” have nothing to do with the ubuntu sudo-madness