Opened 4 years ago

Closed 4 years ago

#16163 closed Cleanup/optimization (invalid)

createsuperuser management command doesn't accept a password

Reported by: anonymous Owned by: nobody
Component: contrib.auth Version: 1.3
Severity: Normal Keywords:
Cc: bradley.ayers@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX:


Line 57/58 leads me to believe I should at some point be able to pass a password to the createsuperuser command but there doesn't appear to be any mechanism to accept or test for it. It would be handy to be able to.

Change History (2)

comment:1 Changed 4 years ago by Bradley Ayers <bradley.ayers@…>

  • Cc bradley.ayers@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by aaugustin

  • Resolution set to invalid
  • Status changed from new to closed

I think the --password option is not made available by design.

It is a bad practice to allow passing passwords on the command line, because the password will end up in clear text in your ~/.${SHELL}_history.

Line 58 only ensures that password is initialized before line 117. It is useful when interactive is False.

Take a look at r15631. The comment was written to explain why the default value is None and not ''. Granted, it's not very clear.

Note: See TracTickets for help on using tickets.
Back to Top