I'm setting up Jenkins 2.29 in Ubuntu(trusty64) in Vagrant, so everything needs to be done via a setup script. Jenkins starts up with a security lockdown, which one normally disables by copying and pasting an autogenerated password at the Jenkins startup screen. To bypass this using the command line, one should edit /var/lib/jenkins/config.xml, change the useSecurity node to false, and delete the authorizationStrategy and securityRealm nodes (https://wiki.jenkins-ci.org/display/JENKINS/Disable+security)
I've noticed that whenever I do this, and try to access Jenkins, it reverts config.xml to its installation state, so security is never disabled. Deleting config.xml doesn't disable the lockdown either, even though the official Jenkins documentation suggests this as a last-ditch solution.
How can I entirely remove the security lockdown from the command line? Is this something that broke in recent versions of Jenkins only?