Opened 13 years ago

Closed 13 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: no

Description

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.

https://code.djangoproject.com/browser/django/trunk/django/contrib/auth/management/commands/createsuperuser.py

Change History (2)

comment:1 by Bradley Ayers <bradley.ayers@…>, 13 years ago

Cc: bradley.ayers@… added

comment:2 by Aymeric Augustin, 13 years ago

Resolution: invalid
Status: newclosed

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