Is there a way to re disable root

So I read that root is disabled by default, since we have sudo, and sudo -s, we shouldn’t need to enable it.

Well I enabled root to move stuff around delete and copy paste some files via scp without realizing I could have used sudo in the command line to grant access. ( haven’t tried it, but people say it works )

So my question is, without reinstalling is there a way to restore root back to being disabled? Back so it’s not possible to log in with “root”

It’s funny I only found that I could use sudo with scp through a post here when I tried searching about re disabling root… Anyways, thanks.

Type sudo passwd -l root.

2 Likes