How to edit core doctypes like DocType or User?

You can export the role permission using the bench export-fixtures

Reference:

You can add the custom field in the customer and export it using the bench export-fixtures, but if you want to add the custom field in the this doctype then you have to follow the process that i provided in the above post.