Enabling Automatic Login via Terminal
I do not recommend doing this, as it increases security risk, but to answer the question, see below.

I do not have the same macOS version so was not able to test, but you can try creating an AppleScript to do this for you.

Create AppleScript to Disable automatic logic and save to ~/bin/disable-automatic-login.osa

#!/usr/bin/osascript
-- AppleScript to set Security settings "Disable automatic login" unchecked

tell application "System Events"
    tell security preferences
        set properties to { automatic login: true }
    end tell
end tell


Make sure to enable execution chmod +x ~/bin/disable-automatic-login.osa

Add ~/bin to path and run $ disable-automatic-login.osa to disable the automatic login.

Troubleshooting

The documentation is out of date, so the properties may be incorrect, but the idea is the same. You can discover the properties in the Script Editor.app by running the following in the app:

tell application "System Events"
    tell security preferences
        get properties
    end tell
end tell


and change the script with the correct properties.

Extra: Automatic Launch at login with launchd

See http://developernotes.com/archive/2011/04/06/169.aspx