--- ./python/samba/netcmd/domain.py.orig
+++ ./python/samba/netcmd/domain.py
@@ -301,8 +301,10 @@
             def ask(prompt, default=None):
                 if default is not None:
                     print "%s [%s]: " % (prompt, default),
+                    sys.stdout.flush()
                 else:
                     print "%s: " % (prompt,),
+                    sys.stdout.flush()
                 return sys.stdin.readline().rstrip("\n") or default
 
             try:
