﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5753	manage syncdb (first time) in a small chrooted environment for example don't give defaultuser...	ClaesBas	nobody	"What a about this patch?

{{{
Index: django/contrib/auth/create_superuser.py
===================================================================
--- django/contrib/auth/create_superuser.py     (revision 6507)
+++ django/contrib/auth/create_superuser.py     (working copy)
@@ -22,7 +22,10 @@
         default_username = ''
     else:
         # Determine the current system user's username, to use as a default.
-        default_username = pwd.getpwuid(os.getuid())[0].replace(' ', '').lower()
+        try:
+            default_username = pwd.getpwuid(os.getuid())[0].replace(' ', '').lower()
+        except KeyError:
+            default_username = 'admin'
 
     # Determine whether the default username is taken, so we don't display
     # it as an option.
}}}
"		closed	Uncategorized	dev		fixed	syncdb superuser		Accepted	0	0	0	0	0	0
