26

Is it possible to unset the root password once it has been set in ubuntu?

Am trying to run a backup using Arcserve R16 backups agents. I run it as the admin user but of course it does not have root permissions without sudo, which the backup agent does not run (or support). My thinking, to get an initial full backup, was to enable the root account and then run the backup as that user and then remove the password afterwards. Do not think this is strictly best practice but have been scrathcing my head over this for awhile now :(

  • 2
    you'd need to explain how ArcServe works now. Since all the backup solutions I encountered run as root simply because they need to be able to access all files on the system. – Karlson Feb 14 '12 at 15:04

1 Answers1

49

Yes, it is.

sudo passwd -dl root

https://help.ubuntu.com/community/RootSudo#Re-disabling_your_root_account

mikewhatever
  • 32,638
  • 3
    Of note, locking a password does not disable the account, just prevents you from accessing it via password (e.g. via authorized_key still works) – Kevin Sep 01 '21 at 00:38
  • This basically resets it to the state it was in on installing Ubuntu? (sudo still works but direct login doesn't?) – Lampe2020 Sep 11 '23 at 06:00